enable routes

This commit is contained in:
Fran Jurmanović
2024-07-14 20:09:50 +02:00
parent edd1806de9
commit 6e91c02de7
8 changed files with 78 additions and 14 deletions

View File

@@ -1,9 +1,11 @@
package common
import (
"fmt"
"log"
"net"
"os"
"os/exec"
"regexp"
"strings"
@@ -54,3 +56,12 @@ func Find[T any](lst *[]T, callback func(item *T) bool) *T {
}
return nil
}
func RunElevatedCommand(command string, service string) (string, error) {
cmd := exec.Command("powershell", "-File", "run_sc.ps1", command, service)
output, err := cmd.CombinedOutput()
if err != nil {
return "", fmt.Errorf("error: %v, output: %s", err, output)
}
return string(output), nil
}

View File

@@ -14,7 +14,9 @@ import (
)
func Start(di *dig.Container) *fiber.App {
app := fiber.New()
app := fiber.New(fiber.Config{
EnablePrintRoutes: true,
})
app.Use(cors.New())