AW-6226 Add admin function to retrieve all users
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit

This commit is contained in:
Peter Bastiani 2024-06-12 12:11:36 +02:00
parent d6587bd63b
commit fc4abf9a5b

View File

@ -4,6 +4,7 @@ import { IItem } from '../models/item';
import { HttpClient, HttpParams } from "@angular/common/http";
import { AppConfig } from "../shared/app.config";
import {ItemTypeService} from './itemtype.service';
import { IUser } from 'dist/common';
@Injectable({
providedIn: 'root',
@ -42,4 +43,8 @@ export class AdminService {
deleteItem(code: string): Observable<any> {
return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/admin/${code}`);
}
getAllUsers(): Observable<IUser[]> {
return this.httpClient.get<IUser[]>(`${this.ApiEndpoint()}/api/v1/admin/users`);
}
}