fix(refactor): patching helpers.tryRoute for API routes, some re-org
Thanks @barisusakli for the tipv1.18.x
parent
d8879d21db
commit
d15d9e4492
@ -0,0 +1,5 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const Write = module.exports;
|
||||||
|
|
||||||
|
Write.users = require('./users');
|
@ -0,0 +1,11 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const users = require('../../user');
|
||||||
|
const helpers = require('../helpers');
|
||||||
|
|
||||||
|
const Users = module.exports;
|
||||||
|
|
||||||
|
Users.create = async (req, res) => {
|
||||||
|
const uid = await users.create(req.body);
|
||||||
|
helpers.formatApiResponse(200, res, await users.getUserData(uid));
|
||||||
|
};
|
Loading…
Reference in New Issue