Skip to content

Commit 4201adc

Browse files
committed
Fixes when doing content changes
1 parent e7b152a commit 4201adc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

controllers/authorController.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ exports.author_create_post = [
8989
}
9090

9191
// Data from form is valid.
92+
// Save and redirect to new author record.
9293
await author.save();
93-
// Redirect to new author record.
9494
res.redirect(author.url);
9595
},
9696
];
@@ -106,6 +106,7 @@ exports.author_delete_get = async (req, res, next) => {
106106
if (author === null) {
107107
// No results.
108108
res.redirect("/catalog/authors");
109+
return;
109110
}
110111

111112
res.render("author_delete", {

views/layout.pug

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ html(lang='en')
44
title= title
55
meta(charset='utf-8')
66
meta(name='viewport', content='width=device-width, initial-scale=1')
7-
link(rel="stylesheet", href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css", integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N", crossorigin="anonymous")
8-
script(src="https://code.jquery.com/jquery-3.5.1.slim.min.js", integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj", crossorigin="anonymous")
9-
script(src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js", integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+", crossorigin="anonymous")
7+
link(rel="stylesheet", href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css", integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr", crossorigin="anonymous")
8+
script(src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js", integrity="sha384-ndDqU0Gzau9qJ1lfW4pNLlhNTkCfHzAVBReH9diLvGRem5+R9g2FzA8ZGN954O5Q", crossorigin="anonymous")
109
link(rel='stylesheet', href='/stylesheets/style.css')
1110
body
1211
div(class='container-fluid')

0 commit comments

Comments
 (0)