Skip to content

Commit

Permalink
fix(server$): return content type changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickJS committed May 20, 2024
1 parent 0380331 commit d71af29
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/qwik-city/runtime/src/server-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,12 @@ export const serverQrl = <T extends ServerFunction>(
throw obj;
}
return obj;
} else if (contentType === 'application/json') {
const obj = await res.json();
if (res.status === 500) {
throw obj;
}
return obj;
}
}
}) as ServerQRL<T>;
Expand Down

0 comments on commit d71af29

Please sign in to comment.