Replaced "baseUrl" with implicit "host" and fixed a minor bug regarding ordering
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user