From 9c6ecbf2aed86e824e3d9125a72fd95753806d88 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 29 Nov 2024 12:28:01 +0100 Subject: [PATCH] more changes --- api_tests/package.json | 2 +- api_tests/pnpm-lock.yaml | 10 +++++----- src/api_routes_v4.rs | 7 +++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/api_tests/package.json b/api_tests/package.json index ea58e00a5..2b34b7cf2 100644 --- a/api_tests/package.json +++ b/api_tests/package.json @@ -28,7 +28,7 @@ "eslint": "^9.14.0", "eslint-plugin-prettier": "^5.1.3", "jest": "^29.5.0", - "lemmy-js-client": "0.20.0-api-v4.10", + "lemmy-js-client": "0.20.0-api-v4.12", "prettier": "^3.2.5", "ts-jest": "^29.1.0", "typescript": "^5.5.4", diff --git a/api_tests/pnpm-lock.yaml b/api_tests/pnpm-lock.yaml index a2af12675..a2cb889bb 100644 --- a/api_tests/pnpm-lock.yaml +++ b/api_tests/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: specifier: ^29.5.0 version: 29.7.0(@types/node@22.9.0) lemmy-js-client: - specifier: 0.20.0-api-v4.10 - version: 0.20.0-api-v4.10 + specifier: 0.20.0-api-v4.12 + version: 0.20.0-api-v4.12 prettier: specifier: ^3.2.5 version: 3.3.3 @@ -1167,8 +1167,8 @@ packages: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} - lemmy-js-client@0.20.0-api-v4.10: - resolution: {integrity: sha512-Dtl0CuS2LSVTX02TTRW3Zu51VWUZW3cPt3he+dnfPLVAr+nRA5erGObQJH5B353IO4RTPXDV+nYl+GKHgDeLtw==} + lemmy-js-client@0.20.0-api-v4.12: + resolution: {integrity: sha512-U6/1ZLBgWHCQgqKraNUGASORqgUPTdutReqeY8+Bl5LYpenFGe87jM3A6Eniu3PQ+C6hBWNbC5axl8EdLOMLrA==} leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} @@ -3077,7 +3077,7 @@ snapshots: kleur@3.0.3: {} - lemmy-js-client@0.20.0-api-v4.10: {} + lemmy-js-client@0.20.0-api-v4.12: {} leven@3.1.0: {} diff --git a/src/api_routes_v4.rs b/src/api_routes_v4.rs index ecae3a6ff..9ac71ea5a 100644 --- a/src/api_routes_v4.rs +++ b/src/api_routes_v4.rs @@ -363,8 +363,11 @@ pub fn config(cfg: &mut ServiceConfig, rate_limit: &RateLimitCell) { .route("/ban", post().to(ban_from_site)) .route("/banned", get().to(list_banned_users)) .route("/leave", post().to(leave_admin)) - .route("block_instance", post().to(admin_block_instance)) - .route("allow_instance", post().to(admin_allow_instance)), + .service( + scope("/instance") + .route("/block", post().to(admin_block_instance)) + .route("/allow", post().to(admin_allow_instance)), + ), ) .service( scope("/custom_emoji")