module.exports = Self => { Self.remoteMethod('signOut', { description: 'Logout a user with access token', accepts: [ { arg: 'ctx', type: 'Object', http: {source: 'context'} } ], returns: { type: 'Boolean', root: true }, http: { path: `/signOut`, verb: 'POST' } }); Self.signOut = async function(ctx) { await Self.app.models.VnUser.logout(ctx.req.accessToken.id); return true; }; };