Push message when user is connected on new room

This commit is contained in:
Gregoire Parant 2020-10-20 09:20:00 +02:00
parent eb1f62bb1c
commit 8d1d6fc8dc
3 changed files with 24 additions and 5 deletions

View file

@ -9,11 +9,13 @@ export interface AdminApiData {
tags: string[]
policy_type: number
userUuid: string
messages?: unknown[]
}
export interface fetchMemberDataByUuidResponse {
uuid: string;
tags: string[];
messages: unknown[];
}
class AdminApi {
@ -32,9 +34,9 @@ class AdminApi {
params.roomSlug = roomSlug;
}
const res = await Axios.get(ADMIN_API_URL+'/api/map',
const res = await Axios.get(ADMIN_API_URL + '/api/map',
{
headers: {"Authorization" : `${ADMIN_API_TOKEN}`},
headers: {"Authorization": `${ADMIN_API_TOKEN}`},
params
}
)
@ -45,7 +47,7 @@ class AdminApi {
if (!ADMIN_API_URL) {
return Promise.reject('No admin backoffice set!');
}
const res = await Axios.get(ADMIN_API_URL+'/membership/'+uuid,
const res = await Axios.get(ADMIN_API_URL+'/api/membership/'+uuid,
{ headers: {"Authorization" : `${ADMIN_API_TOKEN}`} }
)
return res.data;