File tree Expand file tree Collapse file tree 5 files changed +28
-1
lines changed Expand file tree Collapse file tree 5 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ export namespace GetStatusCommand {
25
25
oauth2 : z . object ( {
26
26
providers : z . record ( z . nativeEnum ( OAUTH2_PROVIDERS ) , z . boolean ( ) ) ,
27
27
} ) ,
28
+ branding : z . object ( {
29
+ title : z . nullable ( z . string ( ) ) ,
30
+ logoUrl : z . nullable ( z . string ( ) ) ,
31
+ } ) ,
28
32
} ) ,
29
33
} ) ;
30
34
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @remnawave/backend-contract" ,
3
- "version" : " 2.1.58 " ,
3
+ "version" : " 2.1.60 " ,
4
4
"public" : true ,
5
5
"license" : " AGPL-3.0-only" ,
6
6
"description" : " A contract library for Remnawave Backend. It can be used in backend and frontend." ,
Original file line number Diff line number Diff line change @@ -174,6 +174,9 @@ export const configSchema = z
174
174
}
175
175
} )
176
176
. pipe ( z . array ( z . string ( ) ) . optional ( ) ) ,
177
+
178
+ BRANDING_TITLE : z . string ( ) . optional ( ) ,
179
+ BRANDING_LOGO_URL : z . string ( ) . optional ( ) ,
177
180
} )
178
181
. superRefine ( ( data , ctx ) => {
179
182
if ( data . WEBHOOK_ENABLED === 'true' ) {
Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ export class AuthService {
57
57
client : arctic . Yandex ;
58
58
allowedEmails : string [ ] ;
59
59
} ;
60
+ private readonly branding : {
61
+ title : string | null ;
62
+ logoUrl : string | null ;
63
+ } ;
60
64
private readonly oauth2Providers : Record < TOAuth2ProvidersKeys , boolean > ;
61
65
62
66
constructor (
@@ -79,6 +83,11 @@ export class AuthService {
79
83
this . configService . get < string > ( 'OAUTH2_YANDEX_ENABLED' ) === 'true' ;
80
84
const isTgAuthEnabled = this . configService . get < string > ( 'TELEGRAM_OAUTH_ENABLED' ) === 'true' ;
81
85
86
+ this . branding = {
87
+ title : this . configService . get < string > ( 'BRANDING_TITLE' ) ?? null ,
88
+ logoUrl : this . configService . get < string > ( 'BRANDING_LOGO_URL' ) ?? null ,
89
+ } ;
90
+
82
91
this . oauth2Providers = {
83
92
[ OAUTH2_PROVIDERS . GITHUB ] : isGithubAuthEnabled ,
84
93
[ OAUTH2_PROVIDERS . POCKETID ] : isPocketIdAuthEnabled ,
@@ -377,6 +386,7 @@ export class AuthService {
377
386
] ) ,
378
387
) as Record < TOAuth2ProvidersKeys , boolean > ,
379
388
} ,
389
+ branding : this . branding ,
380
390
} ) ,
381
391
} ;
382
392
}
@@ -390,6 +400,7 @@ export class AuthService {
390
400
oauth2 : {
391
401
providers : this . oauth2Providers ,
392
402
} ,
403
+ branding : this . branding ,
393
404
} ) ,
394
405
} ;
395
406
} catch ( error ) {
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ export class GetStatusResponseModel {
9
9
public readonly oauth2 : {
10
10
providers : Record < TOAuth2ProvidersKeys , boolean > ;
11
11
} ;
12
+ public readonly branding : {
13
+ title : string | null ;
14
+ logoUrl : string | null ;
15
+ } ;
12
16
13
17
constructor ( data : {
14
18
isLoginAllowed : boolean ;
@@ -19,10 +23,15 @@ export class GetStatusResponseModel {
19
23
oauth2 : {
20
24
providers : Record < TOAuth2ProvidersKeys , boolean > ;
21
25
} ;
26
+ branding : {
27
+ title : string | null ;
28
+ logoUrl : string | null ;
29
+ } ;
22
30
} ) {
23
31
this . isLoginAllowed = data . isLoginAllowed ;
24
32
this . isRegisterAllowed = data . isRegisterAllowed ;
25
33
this . tgAuth = data . tgAuth ;
26
34
this . oauth2 = data . oauth2 ;
35
+ this . branding = data . branding ;
27
36
}
28
37
}
You can’t perform that action at this time.
0 commit comments