mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: update rbac_check to allow 'read' action for anonymous users
This commit is contained in:
parent
3b5c4f9d92
commit
b3ef0eb10b
2 changed files with 5 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue