Compare commits

...

2 Commits

Author SHA1 Message Date
3a80a6f7f3 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-06-12 15:29:24 +02:00
71a2ef44e6 AW-6226 Add admin function to post task on behalve of other user 2024-06-12 15:29:15 +02:00

View File

@ -2,6 +2,7 @@ import { HttpClient, HttpParams } from "@angular/common/http";
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { IItem } from '../models/item';
import { IItemTask } from '../models/itemTask';
import { IUser } from '../models/user';
import { AppConfig } from "../shared/app.config";
import { ItemTypeService } from './itemtype.service';
@ -47,4 +48,8 @@ export class AdminService {
getAllUsers(): Observable<IUser[]> {
return this.httpClient.get<IUser[]>(`${this.ApiEndpoint()}/api/v1/admin/users`);
}
postItemTask(item: IItem, task: IItemTask): Observable<IItemTask> {
return this.httpClient.post<IItemTask>(`${this.ApiEndpoint()}/api/v1/admin/${item.code}/tasks`, task);
}
}