Skip to content

Commit 228b731

Browse files
authored
fix: status api pathname (#11)
2 parents 320c2c4 + 310550b commit 228b731

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/jsons/status.nim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ proc formatConversationAsJson*(conv: Conversation): JsonNode =
5353

5454
proc createJsonApiStatusRouter*(cfg: Config) =
5555
router jsonapi_status:
56-
get "/@name/status/@id/?":
56+
get "/api/@name/status/@id/?":
5757
cond '.' notin @"name"
5858
let id = @"id"
5959

@@ -72,16 +72,16 @@ proc createJsonApiStatusRouter*(cfg: Config) =
7272

7373
respJsonSuccess formatConversationAsJson(conv)
7474

75-
get "/@name/@s/@id/@m/?@i?":
75+
get "/api/@name/@s/@id/@m/?@i?":
7676
cond @"s" in ["status", "statuses"]
7777
cond @"m" in ["video", "photo"]
7878
redirect("/api/$1/status/$2" % [@"name", @"id"])
7979

80-
get "/@name/statuses/@id/?":
80+
get "/api/@name/statuses/@id/?":
8181
redirect("/api/$1/status/$2" % [@"name", @"id"])
8282

83-
get "/i/web/status/@id":
83+
get "/api/i/web/status/@id":
8484
redirect("/api/i/status/" & @"id")
8585

86-
get "/@name/thread/@id/?":
86+
get "/api/@name/thread/@id/?":
8787
redirect("/api/$1/status/$2" % [@"name", @"id"])

0 commit comments

Comments
 (0)