summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/ping.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2021-01-09 09:25:27 +0900
committersyuilo <syuilotan@yahoo.co.jp>2021-01-09 09:25:27 +0900
commitf7ebf14501e9b86acef551507e5b3ff56527ac7d (patch)
tree78a37fbb9417e004d28eb166d4b4991ff433d556 /src/server/api/endpoints/ping.ts
parent:art: (diff)
downloadsharkey-f7ebf14501e9b86acef551507e5b3ff56527ac7d.tar.gz
sharkey-f7ebf14501e9b86acef551507e5b3ff56527ac7d.tar.bz2
sharkey-f7ebf14501e9b86acef551507e5b3ff56527ac7d.zip
Add ping api
Diffstat (limited to 'src/server/api/endpoints/ping.ts')
-rw-r--r--src/server/api/endpoints/ping.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/server/api/endpoints/ping.ts b/src/server/api/endpoints/ping.ts
new file mode 100644
index 0000000000..0b1bb6e164
--- /dev/null
+++ b/src/server/api/endpoints/ping.ts
@@ -0,0 +1,27 @@
+import define from '../define';
+
+export const meta = {
+ requireCredential: false as const,
+
+ tags: ['meta'],
+
+ params: {
+ },
+
+ res: {
+ type: 'object' as const,
+ optional: false as const, nullable: false as const,
+ properties: {
+ pong: {
+ type: 'number' as const,
+ optional: false as const, nullable: false as const,
+ },
+ }
+ }
+};
+
+export default define(meta, async () => {
+ return {
+ pong: Date.now(),
+ };
+});