From fcb1d4f8c5f7e816ec67a770032795d078e4b9a9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 8 Jun 2021 14:14:58 +0900 Subject: [PATCH] refactor type --- src/server/api/endpoints/admin/emoji/list-remote.ts | 4 ++-- src/server/api/endpoints/admin/emoji/list.ts | 2 +- src/server/api/endpoints/admin/logs.ts | 4 ++-- src/server/api/endpoints/app/create.ts | 2 +- src/server/api/endpoints/drive/files.ts | 2 +- src/server/api/endpoints/drive/files/create.ts | 4 ++-- src/server/api/endpoints/drive/files/find.ts | 2 +- src/server/api/endpoints/drive/files/upload-from-url.ts | 6 +++--- src/server/api/endpoints/drive/folders.ts | 2 +- src/server/api/endpoints/drive/folders/find.ts | 2 +- src/server/api/endpoints/notes/create.ts | 2 +- src/server/api/endpoints/notes/search-by-tag.ts | 6 +++--- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/server/api/endpoints/admin/emoji/list-remote.ts b/src/server/api/endpoints/admin/emoji/list-remote.ts index bd0b3dfc3..f1cfbdd3e 100644 --- a/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -14,12 +14,12 @@ export const meta = { params: { query: { validator: $.optional.nullable.str, - default: null as any + default: null }, host: { validator: $.optional.nullable.str, - default: null as any + default: null }, limit: { diff --git a/src/server/api/endpoints/admin/emoji/list.ts b/src/server/api/endpoints/admin/emoji/list.ts index 4473fbdd1..3f3e49396 100644 --- a/src/server/api/endpoints/admin/emoji/list.ts +++ b/src/server/api/endpoints/admin/emoji/list.ts @@ -14,7 +14,7 @@ export const meta = { params: { query: { validator: $.optional.nullable.str, - default: null as any + default: null }, limit: { diff --git a/src/server/api/endpoints/admin/logs.ts b/src/server/api/endpoints/admin/logs.ts index cb49bf602..e719ce19c 100644 --- a/src/server/api/endpoints/admin/logs.ts +++ b/src/server/api/endpoints/admin/logs.ts @@ -17,12 +17,12 @@ export const meta = { level: { validator: $.optional.nullable.str, - default: null as any + default: null }, domain: { validator: $.optional.nullable.str, - default: null as any + default: null } }, diff --git a/src/server/api/endpoints/app/create.ts b/src/server/api/endpoints/app/create.ts index b5629e443..500567bf2 100644 --- a/src/server/api/endpoints/app/create.ts +++ b/src/server/api/endpoints/app/create.ts @@ -26,7 +26,7 @@ export const meta = { // TODO: Check it is valid url callbackUrl: { validator: $.optional.nullable.str, - default: null as any, + default: null, }, }, diff --git a/src/server/api/endpoints/drive/files.ts b/src/server/api/endpoints/drive/files.ts index 60cb8c513..1e821b008 100644 --- a/src/server/api/endpoints/drive/files.ts +++ b/src/server/api/endpoints/drive/files.ts @@ -27,7 +27,7 @@ export const meta = { folderId: { validator: $.optional.nullable.type(ID), - default: null as any, + default: null, }, type: { diff --git a/src/server/api/endpoints/drive/files/create.ts b/src/server/api/endpoints/drive/files/create.ts index 7da9a20f8..a8f6b9201 100644 --- a/src/server/api/endpoints/drive/files/create.ts +++ b/src/server/api/endpoints/drive/files/create.ts @@ -24,12 +24,12 @@ export const meta = { params: { folderId: { validator: $.optional.nullable.type(ID), - default: null as any, + default: null, }, name: { validator: $.optional.nullable.str, - default: null as any, + default: null, }, isSensitive: { diff --git a/src/server/api/endpoints/drive/files/find.ts b/src/server/api/endpoints/drive/files/find.ts index f95504a00..b7f257145 100644 --- a/src/server/api/endpoints/drive/files/find.ts +++ b/src/server/api/endpoints/drive/files/find.ts @@ -17,7 +17,7 @@ export const meta = { folderId: { validator: $.optional.nullable.type(ID), - default: null as any, + default: null, }, }, diff --git a/src/server/api/endpoints/drive/files/upload-from-url.ts b/src/server/api/endpoints/drive/files/upload-from-url.ts index 65213be6a..8dfc86e66 100644 --- a/src/server/api/endpoints/drive/files/upload-from-url.ts +++ b/src/server/api/endpoints/drive/files/upload-from-url.ts @@ -26,7 +26,7 @@ export const meta = { folderId: { validator: $.optional.nullable.type(ID), - default: null as any, + default: null, }, isSensitive: { @@ -36,12 +36,12 @@ export const meta = { comment: { validator: $.optional.nullable.str, - default: null as any, + default: null, }, marker: { validator: $.optional.nullable.str, - default: null as any, + default: null, }, force: { diff --git a/src/server/api/endpoints/drive/folders.ts b/src/server/api/endpoints/drive/folders.ts index 014f986f9..c446d546c 100644 --- a/src/server/api/endpoints/drive/folders.ts +++ b/src/server/api/endpoints/drive/folders.ts @@ -27,7 +27,7 @@ export const meta = { folderId: { validator: $.optional.nullable.type(ID), - default: null as any, + default: null, } }, diff --git a/src/server/api/endpoints/drive/folders/find.ts b/src/server/api/endpoints/drive/folders/find.ts index f99e2fe1d..c8e7639e6 100644 --- a/src/server/api/endpoints/drive/folders/find.ts +++ b/src/server/api/endpoints/drive/folders/find.ts @@ -17,7 +17,7 @@ export const meta = { parentId: { validator: $.optional.nullable.type(ID), - default: null as any, + default: null, }, }, diff --git a/src/server/api/endpoints/notes/create.ts b/src/server/api/endpoints/notes/create.ts index 7410d28cb..beeacb537 100644 --- a/src/server/api/endpoints/notes/create.ts +++ b/src/server/api/endpoints/notes/create.ts @@ -50,7 +50,7 @@ export const meta = { && length(text.trim()) <= maxNoteTextLength && Array.from(text.trim()).length <= DB_MAX_NOTE_TEXT_LENGTH // DB limit ), - default: null as any, + default: null, }, cw: { diff --git a/src/server/api/endpoints/notes/search-by-tag.ts b/src/server/api/endpoints/notes/search-by-tag.ts index b7d41d9e7..bbada1761 100644 --- a/src/server/api/endpoints/notes/search-by-tag.ts +++ b/src/server/api/endpoints/notes/search-by-tag.ts @@ -23,12 +23,12 @@ export const meta = { reply: { validator: $.optional.nullable.bool, - default: null as any, + default: null, }, renote: { validator: $.optional.nullable.bool, - default: null as any, + default: null, }, withFiles: { @@ -37,7 +37,7 @@ export const meta = { poll: { validator: $.optional.nullable.bool, - default: null as any, + default: null, }, sinceId: {