FEATURE: clicking on another player show a contact card when possible
This commit is contained in:
parent
fffd36267d
commit
c5f3cfe87c
14 changed files with 183 additions and 9 deletions
22
back/src/Services/AdminApi.ts
Normal file
22
back/src/Services/AdminApi.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import {ADMIN_API_TOKEN, ADMIN_API_URL} from "../Enum/EnvironmentVariable";
|
||||
import Axios from "axios";
|
||||
|
||||
|
||||
class AdminApi {
|
||||
|
||||
fetchVisitCardUrl(membershipUuid: string): Promise<string> {
|
||||
if (ADMIN_API_URL) {
|
||||
return Axios.get(ADMIN_API_URL + '/api/membership/'+membershipUuid,
|
||||
{headers: {"Authorization": `${ADMIN_API_TOKEN}`}}
|
||||
).then((res) => {
|
||||
return res.data;
|
||||
}).catch(() => {
|
||||
return 'INVALID';
|
||||
});
|
||||
} else {
|
||||
return Promise.resolve('INVALID')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const adminApi = new AdminApi();
|
Loading…
Add table
Add a link
Reference in a new issue