Archived
2

model routes

This commit is contained in:
VLE2FE
2020-08-13 12:07:40 +02:00
parent d363064dba
commit 08a9a12372
8 changed files with 273 additions and 11 deletions

View File

@ -678,6 +678,13 @@
"__v": 0
}
],
"models": [
{
"_id": {"$oid":"140000000000000000000001"},
"name": "modela",
"data": {"buffer": "binary data"}
}
],
"users": [
{
"_id": {"$oid":"000000000000000000000001"},

View File

@ -69,6 +69,9 @@ export default class TestHelper {
if (options.hasOwnProperty('req')) { // request body
st = st.send(options.req);
}
if (options.hasOwnProperty('reqContentType')) { // request body
st = st.set('Content-Type', options.reqContentType);
}
if (options.hasOwnProperty('auth') && options.auth.hasOwnProperty('basic')) { // resolve basic auth
if (this.auth.hasOwnProperty(options.auth.basic)) {
st = st.auth(options.auth.basic, this.auth[options.auth.basic].pass)