fix: news frontend

This commit is contained in:
DecDuck
2025-03-10 12:05:10 +11:00
parent b6f52f660a
commit 1eede0f035
7 changed files with 53 additions and 62 deletions

View File

@ -23,20 +23,20 @@ export const useNews = () => {
const create = async (article: {
title: string;
excerpt: string;
description: string;
content: string;
image?: string;
tags: string[];
authorId: string;
}) => {
return await $fetch('/api/v1/news', {
return await $fetch('/api/v1/admin/news', {
method: 'POST',
body: article
});
};
const remove = async (id: string) => {
return await $fetch(`/api/v1/news/${id}`, {
return await $fetch(`/api/v1/admin/news/${id}`, {
method: 'DELETE'
});
};