mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-03 19:43:04 +08:00
Temporarily patch /account to not check schema
This commit is contained in:
parent
26ac02e0bf
commit
016bad67b9
1 changed files with 15 additions and 13 deletions
|
@ -6,23 +6,25 @@ function replacer(key, value) {
|
|||
}
|
||||
|
||||
function jsonSchema(modelName) {
|
||||
const models = ['Message', 'Thread', 'File', 'Error', 'SyncbackRequest']
|
||||
const models = ['Message', 'Thread', 'File', 'Error', 'SyncbackRequest', 'Account']
|
||||
if (models.includes(modelName)) {
|
||||
return Joi.object();
|
||||
}
|
||||
if (modelName === 'Account') {
|
||||
return Joi.object().keys({
|
||||
id: Joi.number(),
|
||||
object: Joi.string(),
|
||||
email_address: Joi.string(),
|
||||
provider: Joi.string(),
|
||||
organization_unit: Joi.string(),
|
||||
connection_settings: Joi.object(),
|
||||
sync_policy: Joi.object(),
|
||||
sync_error: Joi.object().allow(null),
|
||||
first_sync_completed_at: Joi.number().allow(null),
|
||||
last_sync_completions: Joi.array(),
|
||||
})
|
||||
// Ben: Disabled temporarily because folks keep changing the keys and it's hard
|
||||
// to keep in sync. Might need to consider another approach to these.
|
||||
// return Joi.object().keys({
|
||||
// id: Joi.number(),
|
||||
// object: Joi.string(),
|
||||
// email_address: Joi.string(),
|
||||
// provider: Joi.string(),
|
||||
// organization_unit: Joi.string(),
|
||||
// connection_settings: Joi.object(),
|
||||
// sync_policy: Joi.object(),
|
||||
// sync_error: Joi.object().allow(null),
|
||||
// first_sync_completed_at: Joi.number().allow(null),
|
||||
// last_sync_completions: Joi.array(),
|
||||
// })
|
||||
}
|
||||
if (modelName === 'Folder') {
|
||||
return Joi.object().keys({
|
||||
|
|
Loading…
Reference in a new issue