Replaced "baseUrl" with implicit "host" and fixed a minor bug regarding ordering

This commit is contained in:
matty
2023-10-25 16:34:47 +03:30
parent 247774b181
commit 3cd00d74bf
6 changed files with 51 additions and 22 deletions

View File

@@ -1,12 +1,11 @@
{{
const axios = require('axios');
const wait = axios.get(`${baseUrl}/products`).then(res => {
const wait = axios.get(`${host}/products`).then(res => {
let length = res.data.length;
let exists = res.data.find(item => item.id === 78);
if(length===78 && exists){
return axios.delete(`${baseUrl}/products?id=eq.78`)
return axios.delete(`${host}/products?id=eq.78`)
.then(res => {
return null;
})
@@ -17,7 +16,7 @@
}}
###
POST {{baseUrl}}/products
POST /products
Content-Type: application/json
Prefer: return=representation
@@ -40,7 +39,7 @@ Prefer: return=representation
###
POST {{baseUrl}}/products
POST /products
Content-Type: application/json
Prefer: return=headers-only