Skip to content

Commit

Permalink
Attempt to resolve unsafe assignment in categoryRoutes
Browse files Browse the repository at this point in the history
  • Loading branch information
LillianHo5 committed May 27, 2024
1 parent 2ae4ac0 commit 3529922
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const getAllCategories = async () => {
const url = `${process.env.API_URL}/categories`;

const response = await fetch(url);
const data: GetCategoriesResponse = await response.json();
const data = (await response.json()) as GetCategoriesResponse;

return data.categories;
} catch (error) {
Expand Down

0 comments on commit 3529922

Please sign in to comment.