Refactor user editing endpoints (only auth site) under api/user/ while leaving host-based endpoints at api root.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
</header>
|
||||
<RegistrationLinkModal
|
||||
inline
|
||||
:endpoint="'/auth/api/create-link'"
|
||||
:endpoint="'/auth/api/user/create-link'"
|
||||
:user-name="userName"
|
||||
:auto-copy="false"
|
||||
:prefix-copy-with-user-name="!!userName"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:created-at="authStore.userInfo.user.created_at"
|
||||
:last-seen="authStore.userInfo.user.last_seen"
|
||||
:loading="authStore.isLoading"
|
||||
update-endpoint="/auth/api/user-display-name"
|
||||
update-endpoint="/auth/api/user/display-name"
|
||||
@saved="authStore.loadUserInfo()"
|
||||
@edit-name="openNameDialog"
|
||||
/>
|
||||
@@ -68,7 +68,7 @@
|
||||
</section>
|
||||
<RegistrationLinkModal
|
||||
v-if="showRegLink"
|
||||
:endpoint="'/auth/api/create-link'"
|
||||
:endpoint="'/auth/api/user/create-link'"
|
||||
:auto-copy="false"
|
||||
:prefix-copy-with-user-name="false"
|
||||
@close="showRegLink = false"
|
||||
|
||||
@@ -127,7 +127,7 @@ export const useAuthStore = defineStore('auth', {
|
||||
}
|
||||
},
|
||||
async deleteCredential(uuid) {
|
||||
const response = await fetch(`/auth/api/credential/${uuid}`, {method: 'Delete'})
|
||||
const response = await fetch(`/auth/api/user/credential/${uuid}`, {method: 'Delete'})
|
||||
const result = await response.json()
|
||||
if (result.detail) throw new Error(`Server: ${result.detail}`)
|
||||
|
||||
@@ -135,7 +135,7 @@ export const useAuthStore = defineStore('auth', {
|
||||
},
|
||||
async terminateSession(sessionId) {
|
||||
try {
|
||||
const res = await fetch(`/auth/api/session/${sessionId}`, { method: 'DELETE' })
|
||||
const res = await fetch(`/auth/api/user/session/${sessionId}`, { method: 'DELETE' })
|
||||
let payload = null
|
||||
try {
|
||||
payload = await res.json()
|
||||
@@ -180,7 +180,7 @@ export const useAuthStore = defineStore('auth', {
|
||||
},
|
||||
async logoutEverywhere() {
|
||||
try {
|
||||
const res = await fetch('/auth/api/logout-all', {method: 'POST'})
|
||||
const res = await fetch('/auth/api/user/logout-all', {method: 'POST'})
|
||||
if (!res.ok) {
|
||||
let message = 'Logout failed'
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user