fix: fixed server folder location

This commit is contained in:
mrjvs
2026-08-07 13:49:20 +02:00
parent 128b82c9e7
commit 69d133ab85
9 changed files with 4 additions and 13 deletions

View File

@@ -1,6 +1,4 @@
import z from 'zod';
import { readZodBody } from '~/server/utils/readZodBody';
import { useGrpc } from '~/server/utils/useGrpc';
import { ServerError } from 'nice-grpc';
export type ApiAuthLogin = {

View File

@@ -1,6 +1,3 @@
import { enforceLoggedIn } from '~/server/utils/enforceAuth';
import { useGrpc } from '~/server/utils/useGrpc';
export interface GetApiAuthMe {
pid: number;
username: string;

View File

@@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
const feed = new Feed({
title: 'Pretendo Network Blog',
description: 'The latest updates in condensed chunks',
updated: new Date(posts[0].date),
updated: posts[0] ? new Date(posts[0].date) : undefined,
id: 'http://pretendo.network/',
link: 'https://pretendo.network/blog/',
image: 'https://pretendo.network/assets/images/opengraph/opengraph-image.png',

View File

@@ -3,7 +3,7 @@ import { createChannel, createClient, Channel, type Client, Metadata } from "nic
let grpc: { channel: Channel, client: Client<APIDefinition> } | null = null;
function getGrpcClient(event: H3Event): Client<APIDefinition> {
function getGrpcClient(event: typeof H3Event): Client<APIDefinition> {
if (!grpc) {
const config = useRuntimeConfig();
if (!config.grpcHost || !config.grpcApiKey) {

View File

@@ -1,6 +1,5 @@
<script setup lang="ts">
import { FetchError } from 'ofetch';
import type { ApiAuthLogin, ApiAuthLoginRequest } from '~/server/api/auth/login.post';
const route = useRoute();
const redirect = computed(() => route.query.redirect);
@@ -11,12 +10,12 @@ const errorMessage = ref<string | null>();
async function loginSubmission() {
try {
await $fetch<ApiAuthLogin>('/api/auth/login', {
const res = await $fetch('/api/auth/login', {
method: 'POST',
body: {
username: loginForm.username,
password: loginForm.password,
} satisfies ApiAuthLoginRequest
}
});
if (typeof redirect.value === 'string') {

View File

@@ -1,3 +0,0 @@
{
"extends": "../../.nuxt/tsconfig.server.json"
}