mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 21:57:55 +08:00
25 lines
555 B
JavaScript
25 lines
555 B
JavaScript
|
const Serialization = require('../serialization');
|
||
|
|
||
|
module.exports = (server) => {
|
||
|
server.route({
|
||
|
method: 'GET',
|
||
|
path: '/account',
|
||
|
config: {
|
||
|
description: 'Returns the current account.',
|
||
|
notes: 'Notes go here',
|
||
|
tags: ['accounts'],
|
||
|
validate: {
|
||
|
params: {
|
||
|
},
|
||
|
},
|
||
|
response: {
|
||
|
schema: Serialization.jsonSchema('Account'),
|
||
|
},
|
||
|
},
|
||
|
handler: (request, reply) => {
|
||
|
const account = request.auth.credentials;
|
||
|
reply(Serialization.jsonStringify(account));
|
||
|
},
|
||
|
});
|
||
|
};
|