const Controller = require('libflitter/controller/Controller') const { ObjectId } = require("mongodb"); const Page = require("../../../models/api/Page.model") /* * Misc Controller * ------------------------------------------------------------- * Put some description here! */ class Misc extends Controller { #default_token_grants = ['database'] static get services() { return [...super.services, 'models'] } async get_token(req, res, next) { const Token = this.models.get('api:Token') const token = await Token.for_user(req.user) return res.api(token.token) } } module.exports = exports = Misc