Refactoring: Add PreScript.http
This commit is contained in:
@@ -1,19 +1,4 @@
|
||||
{{
|
||||
const axios = require('axios');
|
||||
|
||||
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(`${host}/products?id=eq.78`)
|
||||
.then(res => {
|
||||
return null;
|
||||
})
|
||||
}
|
||||
return null;
|
||||
})
|
||||
exports.wait = wait;
|
||||
}}
|
||||
# @import ./PreScript.http
|
||||
###
|
||||
|
||||
POST /products
|
||||
|
||||
Reference in New Issue
Block a user