21 lines
523 B
TypeScript
21 lines
523 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import {Observable} from 'rxjs';
|
|
import {HttpClient} from '@angular/common/http';
|
|
import {User} from '../../models/user.model';
|
|
import {GlobalConstants} from '../../global-constants';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class AdminModuleService {
|
|
baseUrl = GlobalConstants.API_URL;
|
|
|
|
constructor(private http: HttpClient) {
|
|
|
|
}
|
|
|
|
updateUserRoles(fileName: any,data: User): Observable<any> {
|
|
return this.http.put(`${this.baseUrl}/users/${fileName}`, data);
|
|
}
|
|
}
|