summaryrefslogtreecommitdiff
path: root/src/tools/refresh-question.ts
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2020-04-03 17:13:41 +0900
committertamaina <tamaina@hotmail.co.jp>2020-04-03 17:13:41 +0900
commit795fb0eb60ea475533b1d9a12182030f93f01cac (patch)
treec42e570047d1e67108d7bb1f8bd5c9fd165bbb1b /src/tools/refresh-question.ts
parentfeat(streaming): Add emoji added event (diff)
downloadmisskey-795fb0eb60ea475533b1d9a12182030f93f01cac.tar.gz
misskey-795fb0eb60ea475533b1d9a12182030f93f01cac.tar.bz2
misskey-795fb0eb60ea475533b1d9a12182030f93f01cac.zip
Pre-render ReDoc
redoc-cliはexpandResponsesは200のみとすると数値と認識されてしまい設定できないため202,204という指定にしています
Diffstat (limited to 'src/tools/refresh-question.ts')
-rw-r--r--src/tools/refresh-question.ts20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/tools/refresh-question.ts b/src/tools/refresh-question.ts
index 83d71ff303..5104590bf4 100644
--- a/src/tools/refresh-question.ts
+++ b/src/tools/refresh-question.ts
@@ -4,11 +4,15 @@ async function main(uri: string): Promise<any> {
return await updateQuestion(uri);
}
-const args = process.argv.slice(2);
-const uri = args[0];
-
-main(uri).then(result => {
- console.log(`Done: ${result}`);
-}).catch(e => {
- console.warn(e);
-});
+export default () => {
+ const args = process.argv.slice(3);
+ const uri = args[0];
+
+ main(uri).then(result => {
+ console.log(`Done: ${result}`);
+ process.exit(0);
+ }).catch(e => {
+ console.warn(e);
+ process.exit(1);
+ });
+}