v3: linter and formatter pass
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user