From c39332c1bfb410a5f20907d75e739dc5cda15ce8 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 14 Dec 2022 09:39:01 +0000 Subject: [PATCH] Revert "Revert "use v1 urls"" This reverts commit 8c6cf86de3b4314bbed4b7ad9147cbf96584cb76. --- src/modules/instance.js | 2 +- src/services/api/api.service.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/instance.js b/src/modules/instance.js index c8c718d0..02cbe1f8 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -178,7 +178,7 @@ const instance = { async getCustomEmoji ({ commit, state }) { try { - const res = await window.fetch('/api/pleroma/emoji.json') + const res = await window.fetch('/api/v1/pleroma/emoji') if (res.ok) { const result = await res.json() const values = Array.isArray(result) ? Object.assign({}, ...result) : result diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 9e6f39f2..afa443f5 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -11,11 +11,11 @@ const CHANGE_EMAIL_URL = '/api/pleroma/change_email' const CHANGE_PASSWORD_URL = '/api/pleroma/change_password' const MOVE_ACCOUNT_URL = '/api/pleroma/move_account' const ALIASES_URL = '/api/pleroma/aliases' -const TAG_USER_URL = '/api/pleroma/admin/users/tag' -const PERMISSION_GROUP_URL = (screenName, right) => `/api/pleroma/admin/users/${screenName}/permission_group/${right}` -const ACTIVATE_USER_URL = '/api/pleroma/admin/users/activate' -const DEACTIVATE_USER_URL = '/api/pleroma/admin/users/deactivate' -const ADMIN_USERS_URL = '/api/pleroma/admin/users' +const TAG_USER_URL = '/api/v1/pleroma/admin/users/tag' +const PERMISSION_GROUP_URL = (screenName, right) => `/api/v1/pleroma/admin/users/${screenName}/permission_group/${right}` +const ACTIVATE_USER_URL = '/api/v1/pleroma/admin/users/activate' +const DEACTIVATE_USER_URL = '/api/v1/pleroma/admin/users/deactivate' +const ADMIN_USERS_URL = '/api/v1/pleroma/admin/users' const SUGGESTIONS_URL = '/api/v1/suggestions' const NOTIFICATION_SETTINGS_URL = '/api/pleroma/notification_settings' const NOTIFICATION_READ_URL = '/api/v1/pleroma/notifications/read' @@ -246,7 +246,7 @@ const register = ({ params, credentials }) => { }) } -const getCaptcha = () => fetch('/api/pleroma/captcha').then(resp => resp.json()) +const getCaptcha = () => fetch('/api/v1/pleroma/captcha').then(resp => resp.json()) const authHeaders = (accessToken) => { if (accessToken) {