0
Fork 0
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:
Darcy Ye 2022-02-23 13:51:02 +08:00 committed by GitHub
parent d2b8aa9355
commit fe0ece4e49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -38,7 +38,6 @@ describe('settings routes', () => {
expect(response.status).toEqual(200);
expect(response.body).toEqual({
...mockSetting,
customDomain,
adminConsole,
});

View file

@ -20,7 +20,8 @@ export default function settingRoutes<T extends AuthedRouter>(router: T) {
}),
async (ctx, next) => {
const { body: setting } = ctx.guard;
ctx.body = await updateSetting(setting);
const { id, ...rest } = await updateSetting(setting);
ctx.body = rest;
return next();
}