This commit is contained in:
Henry Dollman
2024-07-12 20:12:50 -04:00
parent 998fa6e03a
commit aacaf2f04f
17 changed files with 77 additions and 28 deletions

View File

@@ -94,8 +94,10 @@ func main() {
return nil
})
// create ssh key if it doesn't exist
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
// create ssh key if it doesn't exist
getSSHKey()
// api route to return public key
e.Router.GET("/getkey", func(c echo.Context) error {
requestData := apis.RequestInfo(c)
if requestData.Admin == nil {