mirror of
https://git.sr.ht/~roxwize/mipilin
synced 2025-02-08 06:22:50 +00:00
hotfixes 2
Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
parent
52d1e29631
commit
609866b6ad
3 changed files with 6 additions and 5 deletions
|
@ -214,10 +214,6 @@ export default async function (app: Express, db: NodePgDatabase) {
|
|||
.leftJoin(users, eq(journalEntries.user, users.id))
|
||||
)[0];
|
||||
|
||||
//? put into util function?
|
||||
//? also GOD
|
||||
entry.moodString = journalMoodString(entry.moodChange);
|
||||
|
||||
const isMod = req.session["status"] & UserStatus.MODERATOR;
|
||||
if (
|
||||
!entry ||
|
||||
|
@ -229,6 +225,10 @@ export default async function (app: Express, db: NodePgDatabase) {
|
|||
return;
|
||||
}
|
||||
|
||||
//? put into util function?
|
||||
//? also GOD
|
||||
entry.moodString = journalMoodString(entry.moodChange);
|
||||
|
||||
// maybe turn ([x] !== req.session["user"] && !(req.session["status"] & UserStatus.MODERATOR)) into util function
|
||||
entry.content =
|
||||
entry.visibility === 2 &&
|
||||
|
|
|
@ -181,7 +181,7 @@ export default async function (app: Express, db: NodePgDatabase) {
|
|||
return;
|
||||
}
|
||||
} else {
|
||||
if (!validateUrl(req.body.website)) {
|
||||
if (req.body.website?.length > 0 && !validateUrl(req.body.website)) {
|
||||
req.flash(
|
||||
"error",
|
||||
"The website URL provided is invalid or malformed."
|
||||
|
|
|
@ -170,6 +170,7 @@ input {
|
|||
color: black;
|
||||
font-family: inherit;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
}
|
||||
button:focus,
|
||||
textarea:focus,
|
||||
|
|
Loading…
Reference in a new issue