From 37033bf45c14708d93c589282575ea881cc5b0ee Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 4 May 2023 04:21:39 -0400 Subject: [PATCH] refactor: register files service --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index 72fbf0e..0d86380 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "git.lumeweb.com/LumeWeb/portal/config" "git.lumeweb.com/LumeWeb/portal/db" _ "git.lumeweb.com/LumeWeb/portal/docs" + "git.lumeweb.com/LumeWeb/portal/renterd" "git.lumeweb.com/LumeWeb/portal/service" "git.lumeweb.com/LumeWeb/portal/validator" "github.com/iris-contrib/swagger" @@ -15,6 +16,7 @@ import ( ) // Embed a directory of static files for serving from the app's root path +// //go:embed app/* var embedFrontend embed.FS @@ -43,6 +45,8 @@ func main() { renterd.Ready() + service.InitFiles() + // Create a new Iris app instance app := iris.New() @@ -66,6 +70,10 @@ func main() { app.Handle(new(service.AuthService)) }) + mvc.Configure(v1.Party("/files"), func(app *mvc.Application) { + app.Handle(new(service.FilesService)) + }) + swaggerConfig := swagger.Config{ // The url pointing to API definition. URL: "http://localhost:8080/swagger/doc.json",