post /login stub example
This commit is contained in:
parent
eac5118aca
commit
0f3ddfb9f5
@ -1,7 +1,16 @@
|
|||||||
const router = require('express').Router();
|
const router = require("express").Router();
|
||||||
|
|
||||||
router.get('/landing-data', (request, response) => {
|
router.get("/landing-data", (request, response) => {
|
||||||
response.send(require('../json/landing-data/success.json'))
|
response.send(require("../json/landing-data/success.json"));
|
||||||
})
|
});
|
||||||
|
|
||||||
|
router.post("/login", (req, res) => {
|
||||||
|
const { username, password } = req.body;
|
||||||
|
if (username === "admin") {
|
||||||
|
response.send(require("../json/landing-data/success.json"));
|
||||||
|
} else {
|
||||||
|
response.send(require("../json/landing-data/success.json"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
Loading…
Reference in New Issue
Block a user