1
0
Fork 0
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:
Rae 5e 2025-01-30 23:21:57 -05:00
parent 52d1e29631
commit 609866b6ad
Signed by: rae
GPG key ID: 5B1A0FAB9BAB81EE
3 changed files with 6 additions and 5 deletions

View file

@ -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 &&

View file

@ -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."

View file

@ -170,6 +170,7 @@ input {
color: black;
font-family: inherit;
font-size: 14px;
font-weight: normal;
}
button:focus,
textarea:focus,