Compare commits

..

No commits in common. "fad8cdfe08e0e8e7d33afc7d44c1bacd56632ded" and "eb6da8aa1b95b0f84df665f9096f03031c194050" have entirely different histories.

View File

@ -16,11 +16,11 @@ router.post('/login', (request, response) => {
const router = require('express').Router();
router.get('/teachers', (request, response) => {
response.send(require('./json/teachers/success.json'))
response.send(require('../json/teachers/success.json'))
})
router.get('/account', (request, response) => {
response.send(require('./json/account/account.json'))
response.send(require('../json/account/account.json'))
})
router.post('/login', (request, response) => {
@ -28,7 +28,7 @@ router.post('/login', (request, response) => {
const password = request.body.password;
try {
const users = require('./json/account/account.json');
const users = require('../json/account/account.json');
const user = users.data.find(user => user.login === login && user.password === password);
if (!user) {