Fixing the way rights are sent to the admin (now sending organization/world/room)

This commit is contained in:
David Négrier 2020-10-14 10:37:00 +02:00
parent 9113ef4ff6
commit ce93e5bbaa
3 changed files with 17 additions and 7 deletions

View file

@ -51,9 +51,8 @@ class AdminApi {
return Promise.reject('No admin backoffice set!');
}
try {
//todo: send more specialized data instead of the whole id
const res = await Axios.get(ADMIN_API_URL+'/api/member/is-granted-access',
{ headers: {"Authorization" : `${ADMIN_API_TOKEN}`}, params: {memberId, roomIdentifier: roomIdentifier.id} }
{ headers: {"Authorization" : `${ADMIN_API_TOKEN}`}, params: {memberId, organizationSlug: roomIdentifier.organizationSlug, worldSlug: roomIdentifier.worldSlug, roomSlug: roomIdentifier.roomSlug} }
)
return !!res.data;
} catch (e) {