forked from bro-students/multy-stub
up mongo version
This commit is contained in:
parent
c95b015094
commit
6702473053
@ -5,7 +5,7 @@ volumes:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
mongoDb:
|
mongoDb:
|
||||||
image: mongo:4.4.13
|
image: mongo:8.0.3
|
||||||
volumes:
|
volumes:
|
||||||
- ms_volume:/data/db
|
- ms_volume:/data/db
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
const { response } = require('express');
|
|
||||||
|
|
||||||
const router = require('express').Router();
|
const router = require('express').Router();
|
||||||
|
|
||||||
router.get("/users", (request, response) => {
|
router.get("/users", (request, response) => {
|
||||||
@ -10,13 +8,13 @@ router.post("/auth", (request, response) => {
|
|||||||
const {phoneNumber, password} = request.body;
|
const {phoneNumber, password} = request.body;
|
||||||
console.log(phoneNumber, password);
|
console.log(phoneNumber, password);
|
||||||
if (phoneNumber === '89999999999') {
|
if (phoneNumber === '89999999999') {
|
||||||
response.send(require("../json/auth/dogsitter.success.json"))
|
response.send(require("./json/auth/dogsitter.success.json"))
|
||||||
}
|
}
|
||||||
else if (phoneNumber === '89555555555') {
|
else if (phoneNumber === '89555555555') {
|
||||||
response.status(400).send(require("../json/auth/error.json"))
|
response.status(400).send(require("./json/auth/error.json"))
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
response.send(require("../json/auth/owner.success.json"))
|
response.send(require("./json/auth/owner.success.json"))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -24,13 +22,13 @@ router.post("/register", (request, response) => {
|
|||||||
const {firstName, secondName, phoneNumber, password, role} = request.body;
|
const {firstName, secondName, phoneNumber, password, role} = request.body;
|
||||||
console.log(phoneNumber, password, role);
|
console.log(phoneNumber, password, role);
|
||||||
if (phoneNumber === '89283244141' || phoneNumber === '89872855893') {
|
if (phoneNumber === '89283244141' || phoneNumber === '89872855893') {
|
||||||
response.status(400).send(require("../json/register/error.json"))
|
response.status(400).send(require("./json/register/error.json"))
|
||||||
}
|
}
|
||||||
else if (role === 'dogsitter') {
|
else if (role === 'dogsitter') {
|
||||||
response.send(require("../json/register/dogsitter.success.json"))
|
response.send(require("./json/register/dogsitter.success.json"))
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
response.send(require("../json/register/owner.success.json"))
|
response.send(require("./json/register/owner.success.json"))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user