1
0
Fork 0

Many new api calls

This commit is contained in:
Julien Dessaux 2023-05-29 23:25:09 +02:00
parent e52378e03f
commit d79a4485a6
Signed by: adyxax
GPG key ID: F92E51B86E07177E
6 changed files with 75 additions and 8 deletions

View file

@ -1,7 +1,7 @@
import * as api from './api.js';
export async function accept(ctx) {
return await api.send({endpoint: `/my/contracts/${ctx.id}/accept`, method: 'POST'});
return await api.send({endpoint: `/my/contracts/${ctx.contract}/accept`, method: 'POST'});
}
export async function contracts() {
@ -15,3 +15,7 @@ export async function deliver(ctx) {
units: ctx.units,
}});
}
export async function fulfill(ctx) {
return await api.send({ endpoint: `/my/contracts/${ctx.contract}/fulfill`, method: 'POST'});
}