@@ -37,12 +37,13 @@ import {
37
37
PaginatedMangaList ,
38
38
SourcePreferences ,
39
39
SourceSearchResult ,
40
- UpdateCheck ,
41
40
} from '@/typings.ts' ;
42
41
import { HttpMethod as DefaultHttpMethod , IRestClient , RestClient } from '@/lib/requests/client/RestClient.ts' ;
43
42
import storage from '@/util/localStorage.tsx' ;
44
43
import { GraphQLClient } from '@/lib/requests/client/GraphQLClient.ts' ;
45
44
import {
45
+ CheckForServerUpdatesQuery ,
46
+ CheckForServerUpdatesQueryVariables ,
46
47
GetAboutQuery ,
47
48
GetAboutQueryVariables ,
48
49
GetGlobalMetadatasQuery ,
@@ -52,7 +53,7 @@ import {
52
53
} from '@/lib/graphql/generated/graphql.ts' ;
53
54
import { GET_GLOBAL_METADATA , GET_GLOBAL_METADATAS } from '@/lib/graphql/queries/GlobalMetadataQuery.ts' ;
54
55
import { SET_GLOBAL_METADATA } from '@/lib/graphql/mutations/GlobalMetadataMutation.ts' ;
55
- import { GET_ABOUT } from '@/lib/graphql/queries/ServerInfoQuery.ts' ;
56
+ import { CHECK_FOR_SERVER_UPDATES , GET_ABOUT } from '@/lib/graphql/queries/ServerInfoQuery.ts' ;
56
57
57
58
enum SWRHttpMethod {
58
59
SWR_GET ,
@@ -453,8 +454,10 @@ export class RequestManager {
453
454
return this . doRequestNew ( GQLMethod . USE_QUERY , GET_ABOUT , { } , options ) ;
454
455
}
455
456
456
- public useCheckForUpdate ( swrOptions ?: SWROptions < UpdateCheck [ ] > ) : AbortableSWRResponse < UpdateCheck [ ] > {
457
- return this . doRequest ( HttpMethod . SWR_GET , 'settings/check-update' , { swrOptions } ) ;
457
+ public useCheckForUpdate (
458
+ options ?: QueryHookOptions < CheckForServerUpdatesQuery , CheckForServerUpdatesQueryVariables > ,
459
+ ) : AbortableApolloUseQueryResponse < CheckForServerUpdatesQuery , CheckForServerUpdatesQueryVariables > {
460
+ return this . doRequestNew ( GQLMethod . USE_QUERY , CHECK_FOR_SERVER_UPDATES , { } , options ) ;
458
461
}
459
462
460
463
public useGetExtensionList ( swrOptions ?: SWROptions < IExtension [ ] > ) : AbortableSWRResponse < IExtension [ ] > {
0 commit comments