summaryrefslogtreecommitdiff
path: root/packages/backend/src/tools/refresh-question.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/tools/refresh-question.ts')
-rw-r--r--packages/backend/src/tools/refresh-question.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/backend/src/tools/refresh-question.ts b/packages/backend/src/tools/refresh-question.ts
new file mode 100644
index 0000000000..98a3c2865f
--- /dev/null
+++ b/packages/backend/src/tools/refresh-question.ts
@@ -0,0 +1,14 @@
+import { updateQuestion } from '@/remote/activitypub/models/question';
+
+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);
+});