Browse Source

Add client default route

master
Garrit Franke 4 years ago
parent
commit
c8cce8ef47
  1. 9
      client/routes/clients.js
  2. 2
      client/views/layouts/Header.jsx

9
client/routes/clients.js

@ -27,4 +27,13 @@ router.get("/new", async (req, res) => {
});
});
router.get("/:id", async (req, res) => {
const client = await axios
.get(basePath + "/clients/" + req.params.id, {
headers: { Authorization: "Bearer " + req.cookies.token },
})
.then((r) => r.data);
res.send(client);
});
module.exports = router;

2
client/views/layouts/Header.jsx

@ -14,7 +14,7 @@ export default function Head() {
return (
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="/">
Navbar
Ωmega
</a>
<button
class="navbar-toggler"

Loading…
Cancel
Save