Simplify comments

This commit is contained in:
Kalle
2026-09-02 21:02:01 +03:00
parent fe797e1891
commit 6a307ce59e
770 changed files with 4302 additions and 11417 deletions

View File

@@ -3,12 +3,10 @@ import type { TablesInsertable } from "~/db/tables";
import { databaseTimestampNow } from "~/utils/dates";
import { concatUserSubmittedImagePrefix } from "~/utils/kysely.server";
/** Number of seconds an external stream keeps showing in the sidebar after its start time. */
const SIDEBAR_VISIBLE_SECONDS = 6 * 60 * 60;
/** Number of seconds after the start time before an external stream row is deleted. */
const RETENTION_SECONDS = 24 * 60 * 60;
/** Inserts a new admin-curated external stream. */
/** Inserts an admin-curated external stream. */
export function insert(
args: Pick<
TablesInsertable["ExternalStream"],
@@ -23,7 +21,7 @@ export function deleteById(id: number) {
return db.deleteFrom("ExternalStream").where("id", "=", id).execute();
}
/** Lists all external streams (for the admin management page), soonest start time first. */
/** All external streams, soonest first. */
export function findAll() {
return db
.selectFrom("ExternalStream")
@@ -45,7 +43,7 @@ export function findAll() {
.execute();
}
/** External streams that should currently show in the sidebar (started under 6h ago or upcoming). */
/** Streams started under 6h ago or upcoming. */
export function findAllForSidebar() {
return db
.selectFrom("ExternalStream")
@@ -71,7 +69,7 @@ export function findAllForSidebar() {
.execute();
}
/** Deletes external streams whose start time is more than 24h in the past. */
/** Deletes streams that started over 24h ago. */
export function deleteOld() {
return db
.deleteFrom("ExternalStream")