From 8b0b7ff525e64cdeb7f3ee98f6b9804f893e4fe6 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sun, 1 Jan 2023 22:11:19 +0100 Subject: [PATCH] server: change default value for api/admin/show-users origin param Changed from "local" to "combined" to fix a bug when the hostname is set but origin is not. Changelog: Changed --- .../backend/src/server/api/endpoints/admin/show-users.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts index 14889e4de..c15de1402 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -26,13 +26,11 @@ export const paramDef = { offset: { type: 'integer', default: 0 }, sort: { type: 'string', enum: ['+follower', '-follower', '+createdAt', '-createdAt', '+updatedAt', '-updatedAt'] }, state: { type: 'string', enum: ['all', 'alive', 'available', 'admin', 'moderator', 'adminOrModerator', 'silenced', 'suspended'], default: 'all' }, - origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'local' }, + origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'combined' }, username: { type: 'string', nullable: true, default: null }, hostname: { type: 'string', - nullable: true, - default: null, - description: 'The local host is represented with `null`.', + description: "To represent the local host, use `origin: 'local'` instead.", }, }, required: [],