Reorganization of backend + new routes

This commit is contained in:
cdricms
2025-01-29 18:09:41 +01:00
parent 7c66353e63
commit 8110172a38
67 changed files with 1124 additions and 400 deletions

View File

@@ -4,13 +4,14 @@ import (
"context"
"net/http"
core "fr.latosa-escrima/api/core"
core "fr.latosa-escrima/core"
"fr.latosa-escrima/core/models"
)
func HandleDelete(w http.ResponseWriter, r *http.Request) {
code := r.PathValue("shortcode")
_, err := core.DB.NewDelete().
Model((*core.Shortcode)(nil)).
Model((*models.Shortcode)(nil)).
Where("code = ?", code).
Exec(context.Background())
if err != nil {