✨ Fixing office roles
This commit is contained in:
parent
cb58c3caae
commit
f0be719798
@ -30,8 +30,10 @@ export default class OfficeRoles extends BaseAdmin {
|
|||||||
|
|
||||||
public async get(q: IGetRolesParams): Promise<OfficeRole[]> {
|
public async get(q: IGetRolesParams): Promise<OfficeRole[]> {
|
||||||
const url = new URL(this.baseURl);
|
const url = new URL(this.baseURl);
|
||||||
const query = { q };
|
if (q) {
|
||||||
Object.entries(query).forEach(([key, value]) => url.searchParams.set(key, JSON.stringify(value)));
|
const query = { q };
|
||||||
|
Object.entries(query).forEach(([key, value]) => url.searchParams.set(key, JSON.stringify(value)));
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
return await this.getRequest<OfficeRole[]>(url);
|
return await this.getRequest<OfficeRole[]>(url);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user