From 2757c5796d1b9cb6111d0ce95fe021e5f4a203cc Mon Sep 17 00:00:00 2001 From: adjoly Date: Sun, 19 Oct 2025 16:47:24 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=93=9D=E3=80=8D=20doc:=20added?= =?UTF-8?q?=20doc=20to=20this?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/user/ping.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doc/user/ping.md diff --git a/doc/user/ping.md b/doc/user/ping.md new file mode 100644 index 0000000..8051bf1 --- /dev/null +++ b/doc/user/ping.md @@ -0,0 +1,41 @@ +# ping + +Available endpoints: +- POST `/ping` +- GET `/ping/:userId` + +Common return: +- 500 with response +```json +{ + "error": "Internal server error" +} +``` + +## POST `/ping` + +Used to send a ping and update the lastSeenTime (can be used for activity time) + +Input needed : just need a valid token + +Can return: +- 200 +```json +{ + "msg": "last seen time updated successfully" +} +``` + +## GET `/ping/:userId` + +Used to retrive the lastSeenTime of a user + +Input needed : just need a valid token + +Can return: +- 200 +```json +{ + "lastSeenTime": "" +} +```