v3: linter and formatter pass

This commit is contained in:
khannurien
2026-03-22 16:08:12 +00:00
parent 34e908d1bc
commit a104113e05
17 changed files with 159 additions and 56 deletions

View File

@@ -73,7 +73,9 @@ export function createPlaylist(
isPublic: req.isPublic,
createdAt,
};
if (req.description) notifyMentions(userId, req.description, "playlist", id, req.title);
if (req.description) {
notifyMentions(userId, req.description, "playlist", id, req.title);
}
broadcastPlaylistCreated(playlist);
return playlist;
}
@@ -157,7 +159,14 @@ export function updatePlaylist(
const newSlug = makeSlug(newTitle, playlist.id);
db.prepare(
`UPDATE playlists SET title = ?, slug = ?, description = ?, is_public = ?, updated_at = ? WHERE id = ?;`,
).run(newTitle, newSlug, newDescription, newIsPublic ? 1 : 0, now.toISOString(), playlist.id);
).run(
newTitle,
newSlug,
newDescription,
newIsPublic ? 1 : 0,
now.toISOString(),
playlist.id,
);
const updated: Playlist = {
...playlist,
@@ -167,7 +176,15 @@ export function updatePlaylist(
isPublic: newIsPublic,
updatedAt: now,
};
if (newDescription) notifyMentions(requestingUserId, newDescription, "playlist", playlist.id, newTitle);
if (newDescription) {
notifyMentions(
requestingUserId,
newDescription,
"playlist",
playlist.id,
newTitle,
);
}
broadcastPlaylistUpdated(updated);
return updated;
}