feat: request optimizations
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { ApiErrorResponse, Video } from "../types";
|
||||
import type { ApiErrorResponse, Category, Video } from "../types";
|
||||
|
||||
type GetVideosParams = {
|
||||
page?: number;
|
||||
@@ -33,7 +33,9 @@ export function useGetVideos() {
|
||||
if (response.ok) {
|
||||
return {
|
||||
videos: data.data as Video[],
|
||||
meta: data.meta
|
||||
meta: data.meta,
|
||||
role: data.role,
|
||||
categories: data.categories as Category[],
|
||||
};
|
||||
} else {
|
||||
return data as ApiErrorResponse;
|
||||
|
||||
Reference in New Issue
Block a user