AW-6226 Add admin function to post task on behalve of other user
This commit is contained in:
parent
b778e5726c
commit
71a2ef44e6
@ -2,6 +2,7 @@ import { HttpClient, HttpParams } from "@angular/common/http";
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { IItem } from '../models/item';
|
import { IItem } from '../models/item';
|
||||||
|
import { IItemTask } from '../models/itemTask';
|
||||||
import { IUser } from '../models/user';
|
import { IUser } from '../models/user';
|
||||||
import { AppConfig } from "../shared/app.config";
|
import { AppConfig } from "../shared/app.config";
|
||||||
import { ItemTypeService } from './itemtype.service';
|
import { ItemTypeService } from './itemtype.service';
|
||||||
@ -47,4 +48,8 @@ export class AdminService {
|
|||||||
getAllUsers(): Observable<IUser[]> {
|
getAllUsers(): Observable<IUser[]> {
|
||||||
return this.httpClient.get<IUser[]>(`${this.ApiEndpoint()}/api/v1/admin/users`);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user