summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-migrate/validations/tempo.ts2
-rw-r--r--src/pages/api/webhook/biteship.js13
2 files changed, 14 insertions, 1 deletions
diff --git a/src-migrate/validations/tempo.ts b/src-migrate/validations/tempo.ts
index e39f0f8b..cf5914b5 100644
--- a/src-migrate/validations/tempo.ts
+++ b/src-migrate/validations/tempo.ts
@@ -129,7 +129,7 @@ export const TempoSchemaPengiriman = z.object({
dokumenKirimInput: z.string().optional(),
dokumenPengirimanInvoiceInput: z.string().optional(),
dokumenProsedur: z.object({
- name: z.string().min(1, { message: 'Nama file harus diisi' }),
+ name: z.string().optional(),
format: z.string().optional(),
base64: z.string().optional(),
}),
diff --git a/src/pages/api/webhook/biteship.js b/src/pages/api/webhook/biteship.js
new file mode 100644
index 00000000..f1100d2d
--- /dev/null
+++ b/src/pages/api/webhook/biteship.js
@@ -0,0 +1,13 @@
+import odooApi from '@/core/api/odooApi';
+
+
+export default async function handler(req, res) {
+ const body = req.body
+
+ if(req.body){
+ let result = odooApi('POST', '/api/v1/webhook/biteship', body)
+ }
+
+ res.status(200).send("ok");
+
+} \ No newline at end of file