Compare commits
No commits in common. "c2ada9072f5aeaee2b2bf6bc4ec765ad183e039a" and "7b1ce2ae836d3e571ff9df228617a8e004e3949d" have entirely different histories.
c2ada9072f
...
7b1ce2ae83
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user