diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-12-03 19:42:05 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-03 19:42:05 +0900 |
| commit | 3a7182bfb5734599321fc03ea77c48b4dbc326d5 (patch) | |
| tree | c96c46e0a9662809c40381d833e1ed1ca28de873 /packages/backend/src/misc | |
| parent | Update CHANGELOG.md (diff) | |
| download | sharkey-3a7182bfb5734599321fc03ea77c48b4dbc326d5.tar.gz sharkey-3a7182bfb5734599321fc03ea77c48b4dbc326d5.tar.bz2 sharkey-3a7182bfb5734599321fc03ea77c48b4dbc326d5.zip | |
Fastify (#9106)
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* fix
* Update SignupApiService.ts
* wip
* wip
* Update ClientServerService.ts
* wip
* wip
* wip
* Update WellKnownServerService.ts
* wip
* wip
* update des
* wip
* Update ApiServerService.ts
* wip
* update deps
* Update WellKnownServerService.ts
* wip
* update deps
* Update ApiCallService.ts
* Update ApiCallService.ts
* Update ApiServerService.ts
Diffstat (limited to 'packages/backend/src/misc')
| -rw-r--r-- | packages/backend/src/misc/create-temp.ts | 2 | ||||
| -rw-r--r-- | packages/backend/src/misc/fastify-reply-error.ts | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/packages/backend/src/misc/create-temp.ts b/packages/backend/src/misc/create-temp.ts index fa88769de0..429977669e 100644 --- a/packages/backend/src/misc/create-temp.ts +++ b/packages/backend/src/misc/create-temp.ts @@ -18,7 +18,7 @@ export function createTempDir(): Promise<[string, () => void]> { (e, path, cleanup) => { if (e) return rej(e); res([path, cleanup]); - } + }, ); }); } diff --git a/packages/backend/src/misc/fastify-reply-error.ts b/packages/backend/src/misc/fastify-reply-error.ts new file mode 100644 index 0000000000..4e987175e2 --- /dev/null +++ b/packages/backend/src/misc/fastify-reply-error.ts @@ -0,0 +1,11 @@ +// https://www.fastify.io/docs/latest/Reference/Reply/#async-await-and-promises +export class FastifyReplyError extends Error { + public message: string; + public statusCode: number; + + constructor(statusCode: number, message: string) { + super(message); + this.message = message; + this.statusCode = statusCode; + } +} |