blob: 90ae5c30f557bb20039e21d99a4c9fcdcc5867af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from 'src/environments/environment';
@Injectable({
providedIn: 'root'
})
export class PortalAdminsService {
apiUrl = environment.api;
constructor(private http: HttpClient) { }
getPortalAdmins() {
return this.http.get(this.apiUrl.portalAdmins);
}
addPortalAdmin(selectedUser: string) {
return this.http.post(this.apiUrl.portalAdmin, selectedUser);
}
removePortalAdmin(userId: number, orUserId: string) {
let userInfo = userId + "-" + orUserId;
return this.http.delete(this.apiUrl.portalAdmin + '/' + userInfo);
}
}
|