mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-03 19:43:04 +08:00
added folder view api route
This commit is contained in:
parent
6ff596b5a7
commit
e673573fcd
3 changed files with 3 additions and 1 deletions
|
@ -76,6 +76,7 @@ module.exports = (server) => {
|
|||
validate: {
|
||||
query: {
|
||||
client_id: Joi.string().required(),
|
||||
n1_id: Joi.string(),
|
||||
},
|
||||
payload: {
|
||||
email: Joi.string().email().required(),
|
||||
|
|
|
@ -17,6 +17,7 @@ module.exports = (server) => {
|
|||
query: {
|
||||
limit: Joi.number().integer().min(1).max(2000).default(100),
|
||||
offset: Joi.number().integer().min(0).default(0),
|
||||
view: Joi.string().valid('expanded', 'count'),
|
||||
},
|
||||
},
|
||||
response: {
|
||||
|
|
|
@ -12,7 +12,7 @@ DatabaseConnector.forShared().then((db) => {
|
|||
Account.findAll().then((accounts) => {
|
||||
if (accounts.length === 0) {
|
||||
global.Logger.info(`Couldn't find any accounts to sync. Run this CURL command to auth one!`)
|
||||
global.Logger.info(`curl -X POST -H "Content-Type: application/json" -d '{"email":"inboxapptest2@fastmail.fm", "name":"Ben Gotow", "provider":"imap", "settings":{"imap_username":"inboxapptest1@fastmail.fm","imap_host":"mail.messagingengine.com","imap_port":993,"smtp_host":"mail.messagingengine.com","smtp_port":0,"smtp_username":"inboxapptest1@fastmail.fm", "smtp_password":"trar2e","imap_password":"trar2e","ssl_required":true}}' "http://localhost:5100/auth?client_id=123"`)
|
||||
global.Logger.info(`curl -X POST -H "Content-Type: application/json" -d '{"email":"inboxapptest1@fastmail.fm", "name":"Ben Gotow", "provider":"imap", "settings":{"imap_username":"inboxapptest1@fastmail.fm","imap_host":"mail.messagingengine.com","imap_port":993,"smtp_host":"mail.messagingengine.com","smtp_port":0,"smtp_username":"inboxapptest1@fastmail.fm", "smtp_password":"trar2e","imap_password":"trar2e","ssl_required":true}}' "http://localhost:5100/auth?client_id=123"`)
|
||||
}
|
||||
manager.ensureAccountIDsInRedis(accounts.map(a => a.id)).then(() => {
|
||||
manager.start();
|
||||
|
|
Loading…
Reference in a new issue