diff --git a/cmd/main.go b/cmd/main.go
index bdeefec..eb38be8 100644
--- a/cmd/main.go
+++ b/cmd/main.go
@@ -66,7 +66,7 @@ func initArticlesRoutes(r *gin.RouterGroup) {
articlesRouter.GET("/", articles.GetArticleHandler)
articlesRouter.GET("/:id", articles.GetArticleHandler)
articlesRouter.POST("/:id", articles.AddArticleHandler)
- articlesRouter.PATCH("/:id", articles.EditArticleHandler)
+ articlesRouter.PUT("/:id", articles.EditArticleHandler)
articlesRouter.DELETE("/:id", articles.DeleteArticleHandler)
}
diff --git a/web/admin-gui/src/components/ModalSuccessError.vue b/web/admin-gui/src/components/ModalSuccessError.vue
new file mode 100644
index 0000000..57300d2
--- /dev/null
+++ b/web/admin-gui/src/components/ModalSuccessError.vue
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+ {{ props.title ?? 'Échec !' }}
+
+
+
+ {{ props.title ?? 'Succès !' }}
+
+
+ {{ props.description }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/admin-gui/src/utils/database.ts b/web/admin-gui/src/utils/database.ts
index a56c126..5a0ddaf 100644
--- a/web/admin-gui/src/utils/database.ts
+++ b/web/admin-gui/src/utils/database.ts
@@ -11,25 +11,27 @@ export interface Article {
online: boolean
}
-export async function getArticles(id: string) : Promise> {
+export async function getArticles(id: string): Promise> {
return await fetch(`${baseApiUrl}/articles/${id}`, {
credentials: 'include',
method: 'GET',
})
.then(result => result.json())
- .catch(error => {
- console.error(error)
- })
}
-export async function postArticle(article: Article) : Promise