enable routes
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user