mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
chore(core): hide settings default id (#261)
* chore(core): hide settings default id * chore(core): fix patch /settings UT
This commit is contained in:
parent
d2b8aa9355
commit
fe0ece4e49
2 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,6 @@ describe('settings routes', () => {
|
||||||
|
|
||||||
expect(response.status).toEqual(200);
|
expect(response.status).toEqual(200);
|
||||||
expect(response.body).toEqual({
|
expect(response.body).toEqual({
|
||||||
...mockSetting,
|
|
||||||
customDomain,
|
customDomain,
|
||||||
adminConsole,
|
adminConsole,
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,7 +20,8 @@ export default function settingRoutes<T extends AuthedRouter>(router: T) {
|
||||||
}),
|
}),
|
||||||
async (ctx, next) => {
|
async (ctx, next) => {
|
||||||
const { body: setting } = ctx.guard;
|
const { body: setting } = ctx.guard;
|
||||||
ctx.body = await updateSetting(setting);
|
const { id, ...rest } = await updateSetting(setting);
|
||||||
|
ctx.body = rest;
|
||||||
|
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue