mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-09-08 08:56:39 -05:00
fix: fixed server folder location
This commit is contained in:
@@ -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 = {
|
||||
@@ -1,6 +1,3 @@
|
||||
import { enforceLoggedIn } from '~/server/utils/enforceAuth';
|
||||
import { useGrpc } from '~/server/utils/useGrpc';
|
||||
|
||||
export interface GetApiAuthMe {
|
||||
pid: number;
|
||||
username: string;
|
||||
@@ -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',
|
||||
@@ -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) {
|
||||
@@ -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') {
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "../../.nuxt/tsconfig.server.json"
|
||||
}
|
||||
Reference in New Issue
Block a user