Skip to content

Commit 5b3f390

Browse files
committed
refactor: remove profileWebpageUrl from subscription settings
- Remove profileWebpageUrl field from Prisma schema, contract, and related models - Update subscription service to dynamically generate profile web page URL using SUB_PUBLIC_DOMAIN and user's shortUuid - Remove profileWebpageUrl from seed configuration - Bump contract library version to 0.3.11
1 parent 38e304a commit 5b3f390

File tree

11 files changed

+3
-11
lines changed

11 files changed

+3
-11
lines changed

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ FRONT_END_DOMAIN=*
3232

3333
### SUBSCRIPTION PUBLIC DOMAIN ###
3434
### RAW DOMAIN, WITHOUT HTTP/HTTPS, DO NOT PLACE / to end of domain ###
35+
### Used in "profile-web-page-url" response header ###
3536
SUB_PUBLIC_DOMAIN=example.com
3637

3738
### SWAGGER ###

libs/contract/commands/subscription-settings/update-subscription-settings.command.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export namespace UpdateSubscriptionSettingsCommand {
1212

1313
profileTitle: z.optional(z.string()),
1414
supportLink: z.optional(z.string()),
15-
profileWebpageUrl: z.optional(z.string()),
1615
profileUpdateInterval: z.optional(z.number().int()),
1716

1817
happAnnounce: z.optional(z.string().nullable()),

libs/contract/models/subscription-settings.schema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export const SubscriptionSettingsSchema = z.object({
55

66
profileTitle: z.string(),
77
supportLink: z.string(),
8-
profileWebpageUrl: z.string(),
98
profileUpdateInterval: z.number().int(),
109

1110
happAnnounce: z.string().nullable(),

libs/contract/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@remnawave/backend-contract",
3-
"version": "0.3.10",
3+
"version": "0.3.11",
44
"public": true,
55
"license": "AGPL-3.0-only",
66
"description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",

prisma/migrations/20250311181052_add_subscription_settings/migration.sql renamed to prisma/migrations/20250311232029_add_subscription_settings/migration.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ CREATE TABLE "subscription_settings" (
4343
"uuid" UUID NOT NULL DEFAULT gen_random_uuid(),
4444
"profile_title" TEXT NOT NULL,
4545
"support_link" TEXT NOT NULL,
46-
"profile_webpage_url" TEXT NOT NULL,
4746
"profile_update_interval" INTEGER NOT NULL,
4847
"happ_announce" TEXT,
4948
"happ_routing" TEXT,

prisma/schema.prisma

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ model SubscriptionSettings {
267267
uuid String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
268268
profileTitle String @map("profile_title")
269269
supportLink String @map("support_link")
270-
profileWebpageUrl String @map("profile_webpage_url")
271270
profileUpdateInterval Int @map("profile_update_interval")
272271
happAnnounce String? @map("happ_announce")
273272
happRouting String? @map("happ_routing")

prisma/seed/config.seed.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,6 @@ async function seedSubscriptionSettings() {
580580
data: {
581581
profileTitle: 'UmVtbmF3YXZl',
582582
supportLink: 'https://remna.st',
583-
profileWebpageUrl: 'https://remna.st',
584583
profileUpdateInterval: 12,
585584
expiredUsersRemarks: expiredUserRemarks,
586585
limitedUsersRemarks: limitedUserRemarks,

src/modules/subscription-settings/entities/subscription-settings.entity.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export class SubscriptionSettingsEntity implements SubscriptionSettings {
44
uuid: string;
55
profileTitle: string;
66
supportLink: string;
7-
profileWebpageUrl: string;
87
profileUpdateInterval: number;
98

109
happAnnounce: string | null;

src/modules/subscription-settings/models/get-subscription-settings.response.model.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export class SubscriptionSettingsResponseModel {
44
public uuid: string;
55
public profileTitle: string;
66
public supportLink: string;
7-
public profileWebpageUrl: string;
87
public profileUpdateInterval: number;
98
public happAnnounce: string | null;
109
public happRouting: string | null;
@@ -19,7 +18,6 @@ export class SubscriptionSettingsResponseModel {
1918
this.uuid = entity.uuid;
2019
this.profileTitle = entity.profileTitle;
2120
this.supportLink = entity.supportLink;
22-
this.profileWebpageUrl = entity.profileWebpageUrl;
2321
this.profileUpdateInterval = entity.profileUpdateInterval;
2422
this.happAnnounce = entity.happAnnounce;
2523
this.happRouting = entity.happRouting;

src/modules/subscription-settings/subscription-settings.converter.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const entityToModel = (entity: SubscriptionSettingsEntity): SubscriptionSettings
1515
uuid: entity.uuid,
1616
profileTitle: entity.profileTitle,
1717
supportLink: entity.supportLink,
18-
profileWebpageUrl: entity.profileWebpageUrl,
1918
profileUpdateInterval: entity.profileUpdateInterval,
2019

2120
happAnnounce: entity.happAnnounce,

0 commit comments

Comments
 (0)