mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: shared links custom URL (#19999)
* feat: custom url for shared links * feat: use a separate route and query param --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
parent
16b14b390f
commit
9b3718120b
65 changed files with 947 additions and 432 deletions
|
|
@ -0,0 +1,11 @@
|
|||
import { Kysely, sql } from 'kysely';
|
||||
|
||||
export async function up(db: Kysely<any>): Promise<void> {
|
||||
await sql`ALTER TABLE "shared_link" ADD "slug" character varying;`.execute(db);
|
||||
await sql`ALTER TABLE "shared_link" ADD CONSTRAINT "shared_link_slug_uq" UNIQUE ("slug");`.execute(db);
|
||||
}
|
||||
|
||||
export async function down(db: Kysely<any>): Promise<void> {
|
||||
await sql`ALTER TABLE "shared_link" DROP CONSTRAINT "shared_link_slug_uq";`.execute(db);
|
||||
await sql`ALTER TABLE "shared_link" DROP COLUMN "slug";`.execute(db);
|
||||
}
|
||||
|
|
@ -48,4 +48,7 @@ export class SharedLinkTable {
|
|||
|
||||
@Column({ type: 'character varying', nullable: true })
|
||||
password!: string | null;
|
||||
|
||||
@Column({ type: 'character varying', nullable: true, unique: true })
|
||||
slug!: string | null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue