File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { GqlAuthenticationError , GqlInputError } from '@/lib/error'
2
+ import { validateSchema , customBrandingSchema } from '@/lib/validate'
2
3
3
4
export default {
4
5
Query : {
@@ -40,6 +41,19 @@ export default {
40
41
}
41
42
}
42
43
44
+ if ( ! validateSchema ( customBrandingSchema , {
45
+ title,
46
+ primary : colors . primary ,
47
+ secondary : colors . secondary ,
48
+ info : colors . info ,
49
+ success : colors . success ,
50
+ danger : colors . danger ,
51
+ logoId,
52
+ faviconId
53
+ } ) ) {
54
+ throw new GqlInputError ( 'invalid branding' )
55
+ }
56
+
43
57
// TODO: validation, even of logo and favicon.
44
58
45
59
return await models . customBranding . upsert ( {
Original file line number Diff line number Diff line change @@ -351,6 +351,9 @@ function LogoutObstacle ({ onClose }) {
351
351
removeLocalWallets ( )
352
352
353
353
await signOut ( { callbackUrl : '/' , redirect : ! customDomain } )
354
+ if ( customDomain ) {
355
+ onClose ( )
356
+ }
354
357
} }
355
358
>
356
359
logout
You can’t perform that action at this time.
0 commit comments