Fixes for new Ktor API
This commit is contained in:
parent
eacc18e461
commit
270359d73b
1 changed files with 0 additions and 17 deletions
|
@ -122,22 +122,11 @@ export class TwigsHttpService implements TwigsService {
|
||||||
id: string,
|
id: string,
|
||||||
name: string,
|
name: string,
|
||||||
description: string,
|
description: string,
|
||||||
users: UserPermission[],
|
|
||||||
): Observable<Budget> {
|
): Observable<Budget> {
|
||||||
const params = {
|
const params = {
|
||||||
'id': id,
|
'id': id,
|
||||||
'name': name,
|
'name': name,
|
||||||
'description': description,
|
'description': description,
|
||||||
<<<<<<< HEAD
|
|
||||||
'users': users.map(userPermission => {
|
|
||||||
return {
|
|
||||||
user: userPermission.user,
|
|
||||||
permission: Permission[userPermission.permission]
|
|
||||||
};
|
|
||||||
})
|
|
||||||
=======
|
|
||||||
'users': users
|
|
||||||
>>>>>>> 4488aff (Finish implementing /api/budget routes)
|
|
||||||
};
|
};
|
||||||
return this.http.post<Budget>(this.apiUrl + '/budgets', params, this.options)
|
return this.http.post<Budget>(this.apiUrl + '/budgets', params, this.options)
|
||||||
.pipe(map(budget => {
|
.pipe(map(budget => {
|
||||||
|
@ -154,12 +143,6 @@ export class TwigsHttpService implements TwigsService {
|
||||||
const params = {
|
const params = {
|
||||||
'name': budget.name,
|
'name': budget.name,
|
||||||
'description': budget.description,
|
'description': budget.description,
|
||||||
'users': budget.users.map(userPermission => {
|
|
||||||
return {
|
|
||||||
user: userPermission.user,
|
|
||||||
permission: Permission[userPermission.permission]
|
|
||||||
};
|
|
||||||
})
|
|
||||||
};
|
};
|
||||||
return this.http.put<Budget>(`${this.apiUrl}/budgets/${id}`, params, this.options)
|
return this.http.put<Budget>(`${this.apiUrl}/budgets/${id}`, params, this.options)
|
||||||
.pipe(map(budget => {
|
.pipe(map(budget => {
|
||||||
|
|
Loading…
Reference in a new issue