Skip to content

Commit

Permalink
fix: remove @nuxtjs/eslint-config-typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
tfjordside committed Nov 19, 2024
1 parent 7646dbb commit 2eb96ec
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1,333 deletions.
14 changes: 11 additions & 3 deletions .playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
</template>

<script setup>
import { useNuxtApp } from '#app';
import { useNuxtApp, createError } from '#app';
const { $umbracoClient } = useNuxtApp();
let data = await $umbracoClient.fetchData({
params: {
cache: false,
parts: ['content'],
parts: ['contenat'],
},
route: '/',
route: '/sdjsdjkdshjk',
cachingOptions: {
maxAge: 60,
name: 'getData',
Expand All @@ -25,5 +25,13 @@ let data = await $umbracoClient.fetchData({
},
});
if (!data || data.meta.code === 404) {
throw createError({
statusCode: 404,
statusMessage: 'Page Not Found',
fatal: true,
});
}
!data && console.log('DATA:', data);
</script>
9 changes: 9 additions & 0 deletions .playground/error.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<div>
Error
</div>
</template>

<script setup>
</script>
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"devDependencies": {
"@nuxt/module-builder": "^0.8.3",
"@nuxt/schema": "^3.13.0",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"eslint": "^9.9.1",
"nuxt": "^3.13.0",
"typescript": "^5.5.4"
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/server/api/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default defineEventHandler(async (event) => {
return response._data;
} catch (error) {
return createError({
statusCode: error.response.status,
statusCode: error.response?.status || 500,
statusMessage: error.message,
data: error.data,
});
Expand Down
Loading

0 comments on commit 2eb96ec

Please sign in to comment.