Backend update: Macro translation and refactor of saving and playing macros.

This commit is contained in:
Jesse Malotaux 2025-04-12 15:28:21 +02:00
parent 087d7eeca3
commit 266110a51f
10 changed files with 269 additions and 41 deletions

View file

@ -2,6 +2,7 @@ package app
import (
"be/app/helper"
"log"
"mime"
"net/http"
"path/filepath"
@ -29,6 +30,9 @@ func ApiGet(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
file = "../public" + r.URL.Path // request
}
log.Println("ApiGet file: ", file)
contentType := mime.TypeByExtension(filepath.Ext(file)) // get content type
if contentType != "" {