Exit scene acess denied detected (#1369)
* Add auth token user to get right in admin and check if user have right Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com> * Update error show Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
parent
f7daf16ac5
commit
02a21209ec
7 changed files with 67 additions and 8 deletions
|
@ -31,13 +31,19 @@ export interface FetchMemberDataByUuidResponse {
|
|||
}
|
||||
|
||||
class AdminApi {
|
||||
async fetchMapDetails(playUri: string): Promise<MapDetailsData | RoomRedirect> {
|
||||
/**
|
||||
* @var playUri: is url of the room
|
||||
* @var userId: can to be undefined or email or uuid
|
||||
* @return MapDetailsData|RoomRedirect
|
||||
*/
|
||||
async fetchMapDetails(playUri: string, userId?: string): Promise<MapDetailsData | RoomRedirect> {
|
||||
if (!ADMIN_API_URL) {
|
||||
return Promise.reject(new Error("No admin backoffice set!"));
|
||||
}
|
||||
|
||||
const params: { playUri: string } = {
|
||||
const params: { playUri: string; userId?: string } = {
|
||||
playUri,
|
||||
userId,
|
||||
};
|
||||
|
||||
const res = await Axios.get(ADMIN_API_URL + "/api/map", {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue