Compare commits

...

2 Commits

Author SHA1 Message Date
darius
110729602a added id to edit
All checks were successful
build and deploy portfolio / build (push) Successful in 38s
build and deploy portfolio / publish-portfolio (push) Successful in 3s
build and deploy portfolio / publish-docs (push) Successful in 4s
2025-02-25 23:14:46 +01:00
darius
2f5f99df40 Fixed project list 2025-02-25 23:13:08 +01:00
2 changed files with 11 additions and 16 deletions

16
main.go
View File

@ -41,20 +41,16 @@ func main() {
http.MethodPatch, http.MethodPatch,
http.MethodDelete, http.MethodDelete,
}, },
AllowedHeaders: []string{"*"}, AllowedHeaders: []string{"Authorization", "Content-Type", "*"},
AllowCredentials: true, AllowCredentials: true,
Debug: true,
}) })
//init api routes //init api routes
apiMux := api.Routes() apiMux := api.Routes()
//run api server //run api server
go func() { err = http.ListenAndServe(":4001", c.Handler(apiMux))
err := http.ListenAndServe(":4001", c.Handler(apiMux)) if err != nil {
if err != nil { log.Fatal(err)
log.Fatal(err) }
}
}()
// block main thread
select {}
} }

View File

@ -56,19 +56,18 @@ func EditProject(project *ent.Project) g.Node {
b.ImgSq64, b.ImgSq64,
), ),
), ),
Input(Type("hidden"), Value(strconv.Itoa(project.ID)), Name("project_id")), b.Textarea(strconv.Itoa(project.ID), b.Rows(1), e.Name("project_id"), e.Type("hidden")),
//b.Label("ID: "+strconv.Itoa(project.ID), Name("project_id")),
b.Label("Name"), b.Label("Name"),
b.Textarea(project.Name, b.Rows(1), Name("project_name")), b.Textarea(project.Name, b.Rows(1), e.Name("project_name")),
b.Subtitle( b.Subtitle(
6, 6,
b.Label("Repo"), b.Label("Repo"),
b.Textarea(project.URL, b.Rows(1), Name("project_repo")), b.Textarea(project.URL, b.Rows(1), e.Name("project_repo")),
b.Label("Docs"), b.Label("Docs"),
b.Textarea(project.DocURL, b.Rows(1), Name("project_docs"))), b.Textarea(project.DocURL, b.Rows(1), e.Name("project_docs"))),
), ),
b.Content( b.Content(
b.Textarea(project.Description, Name("project_description")), b.Textarea(project.Description, e.Name("project_description")),
), ),
//b.CardFooter( //b.CardFooter(