Fixed project list
This commit is contained in:
parent
43c2a5b20d
commit
fe2d5fda26
10
main.go
10
main.go
@ -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 {}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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.ReadOnly(true)),
|
||||||
//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(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user