feat: update rbac_check to allow 'read' action for anonymous users

This commit is contained in:
swve 2025-03-31 15:32:45 +02:00
parent 3b5c4f9d92
commit b3ef0eb10b
2 changed files with 5 additions and 7 deletions

View file

@ -10,7 +10,7 @@ import {
export async function getUser(user_id: string, access_token: string) {
const result = await fetch(
`${getAPIUrl()}users/id/${user_id}`,
RequestBodyWithAuthHeader('GET', null, null, access_token)
RequestBody('GET', null, null)
)
const res = await errorHandling(result)
return res
@ -19,7 +19,7 @@ export async function getUser(user_id: string, access_token: string) {
export async function getUserByUsername(username: string, access_token: string) {
const result = await fetch(
`${getAPIUrl()}users/username/${username}`,
RequestBodyWithAuthHeader('GET', null, null, access_token)
RequestBody('GET', null, null)
)
const res = await errorHandling(result)
return res