Add some tests and some fixes
This commit is contained in:
@ -101,7 +101,7 @@ export const meta = {
|
||||
|
||||
export default async (params: any, user: ILocalUser, app: IApp) => new Promise(async (res, rej) => {
|
||||
const [ps, psErr] = getParams(meta, params);
|
||||
if (psErr) throw psErr;
|
||||
if (psErr) return rej(psErr);
|
||||
|
||||
const isSecure = user != null && app == null;
|
||||
|
||||
|
@ -132,6 +132,12 @@ export default async (ctx: Koa.Context) => {
|
||||
|
||||
updateUserStats(account, true);
|
||||
|
||||
// Response
|
||||
ctx.body = await pack(account);
|
||||
const res = await pack(account, account, {
|
||||
detail: true,
|
||||
includeSecrets: true
|
||||
});
|
||||
|
||||
res.token = secret;
|
||||
|
||||
ctx.body = res;
|
||||
};
|
||||
|
Reference in New Issue
Block a user