summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/endpoints/federation
diff options
context:
space:
mode:
authorzyoshoka <107108195+zyoshoka@users.noreply.github.com>2023-12-26 14:19:35 +0900
committerGitHub <noreply@github.com>2023-12-26 14:19:35 +0900
commit75034d9240c069baff5a24409ea172374261ea3b (patch)
tree2b701b310befef3cdd6a69e78b75f66d48809826 /packages/backend/src/server/api/endpoints/federation
parent(dev) Issue Templateに、自分で実装してPRを出したいかの意思... (diff)
downloadsharkey-75034d9240c069baff5a24409ea172374261ea3b.tar.gz
sharkey-75034d9240c069baff5a24409ea172374261ea3b.tar.bz2
sharkey-75034d9240c069baff5a24409ea172374261ea3b.zip
refactor(frontend): Reactivityで型を明示するように (#12791)
* refactor(frontend): Reactivityで型を明示するように * fix: プロパティの参照が誤っているのを修正 * fix: 初期化の値を空配列に書き換えていた部分をnullに置き換え
Diffstat (limited to 'packages/backend/src/server/api/endpoints/federation')
-rw-r--r--packages/backend/src/server/api/endpoints/federation/stats.ts72
1 files changed, 9 insertions, 63 deletions
diff --git a/packages/backend/src/server/api/endpoints/federation/stats.ts b/packages/backend/src/server/api/endpoints/federation/stats.ts
index 6548142d41..262aa68776 100644
--- a/packages/backend/src/server/api/endpoints/federation/stats.ts
+++ b/packages/backend/src/server/api/endpoints/federation/stats.ts
@@ -29,37 +29,10 @@ export const meta = {
optional: false,
nullable: false,
items: {
- properties: {
- id: { type: 'string' },
- firstRetrievedAt: { type: 'string' },
- host: { type: 'string' },
- usersCount: { type: 'number' },
- notesCount: { type: 'number' },
- followingCount: { type: 'number' },
- followersCount: { type: 'number' },
- isNotResponding: { type: 'boolean' },
- isSuspended: { type: 'boolean' },
- isBlocked: { type: 'boolean' },
- softwareName: { type: 'string' },
- softwareVersion: { type: 'string' },
- openRegistrations: { type: 'boolean' },
- name: { type: 'string' },
- description: { type: 'string' },
- maintainerName: { type: 'string' },
- maintainerEmail: { type: 'string' },
- isSilenced: { type: 'boolean' },
- iconUrl: { type: 'string' },
- faviconUrl: { type: 'string' },
- themeColor: { type: 'string' },
- infoUpdatedAt: {
- type: 'string',
- nullable: true,
- },
- latestRequestReceivedAt: {
- type: 'string',
- nullable: true,
- },
- }
+ type: 'object',
+ optional: false,
+ nullable: false,
+ ref: 'FederationInstance',
},
},
otherFollowersCount: { type: 'number' },
@@ -68,42 +41,15 @@ export const meta = {
optional: false,
nullable: false,
items: {
- properties: {
- id: { type: 'string' },
- firstRetrievedAt: { type: 'string' },
- host: { type: 'string' },
- usersCount: { type: 'number' },
- notesCount: { type: 'number' },
- followingCount: { type: 'number' },
- followersCount: { type: 'number' },
- isNotResponding: { type: 'boolean' },
- isSuspended: { type: 'boolean' },
- isBlocked: { type: 'boolean' },
- softwareName: { type: 'string' },
- softwareVersion: { type: 'string' },
- openRegistrations: { type: 'boolean' },
- name: { type: 'string' },
- description: { type: 'string' },
- maintainerName: { type: 'string' },
- maintainerEmail: { type: 'string' },
- isSilenced: { type: 'boolean' },
- iconUrl: { type: 'string' },
- faviconUrl: { type: 'string' },
- themeColor: { type: 'string' },
- infoUpdatedAt: {
- type: 'string',
- nullable: true,
- },
- latestRequestReceivedAt: {
- type: 'string',
- nullable: true,
- },
- }
+ type: 'object',
+ optional: false,
+ nullable: false,
+ ref: 'FederationInstance',
},
},
otherFollowingCount: { type: 'number' },
},
- }
+ },
} as const;
export const paramDef = {