Skip to content

Commit

Permalink
add decky fetchNoCors
Browse files Browse the repository at this point in the history
  • Loading branch information
beebls committed Jul 24, 2024
1 parent 5f9e1ce commit 92204e4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"typescript": "^4.6.4"
},
"dependencies": {
"@decky/api": "^1.0.3",
"@decky/ui": "^4.0.1",
"@decky/api": "^1.0.6",
"@decky/ui": "^4.4.0",
"clsx": "^2.1.1",
"color": "^4.2.3",
"lodash": "^4.17.21",
Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/backend-impl/decky-backend-repository-impl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { callable, toaster } from "@decky/api";
import { callable, toaster, fetchNoCors } from "@decky/api";
import { CallError, FetchError, type IBackendRepository } from "@cssloader/backend";

class DeckyBackendRepository implements IBackendRepository {
Expand All @@ -16,7 +16,7 @@ class DeckyBackendRepository implements IBackendRepository {
}
async fetch<Return>(url: string, request: RequestInit) {
try {
const res = await fetch(url, request);
const res = await fetchNoCors(url, request);
if (!res.ok) {
throw new Error(`Res Not Okay - Code ${res.status}`);
}
Expand Down

0 comments on commit 92204e4

Please sign in to comment.