From d79a4485a6b1a3ae6b647d94b45ee22a515441f2 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 29 May 2023 23:25:09 +0200 Subject: Many new api calls --- lib/contracts.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/contracts.js') diff --git a/lib/contracts.js b/lib/contracts.js index 9494595..a118ae4 100644 --- a/lib/contracts.js +++ b/lib/contracts.js @@ -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'}); +} -- cgit v1.2.3