Skip to content

Commit

Permalink
fix: change isValidQuery method
Browse files Browse the repository at this point in the history
  • Loading branch information
demetriusfeijoo committed Sep 20, 2024
1 parent 42ae597 commit a0507ba
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions space-plugins/nuxt-base/middleware/persist-query.global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@ const isValidQuery = (query: unknown): query is Query =>
(('space_id' in query &&
typeof query.space_id === 'string' &&
'user_id' in query &&
typeof query.user_id === 'string' &&
'user_is_admin' in query &&
typeof query.user_is_admin === 'string' &&
'space_name' in query &&
typeof query.space_name === 'string' &&
'space_is_trial' in query &&
typeof query.space_is_trial === 'string' &&
'user_lang' in query &&
typeof query.user_lang === 'string') ||
typeof query.user_id === 'string') ||
('spaceId' in query &&
typeof query.spaceId === 'string' &&
'userId' in query &&
Expand All @@ -37,10 +29,6 @@ type Query =
| {
space_id: string;
user_id: string;
user_is_admin: string;
space_name: string;
space_is_trial: string;
user_lang: string;
}
| {
spaceId: string;
Expand Down

0 comments on commit a0507ba

Please sign in to comment.