Renamed sqlite DB for guestbook as gbsqlite.
This commit is contained in:
parent
f3288d9869
commit
de8f042019
@ -14,6 +14,7 @@ import (
|
||||
|
||||
"git.arav.su/Arav/dwelling-home/internal/http"
|
||||
"git.arav.su/Arav/dwelling-home/pkg/mindflow/database/sqlite"
|
||||
gbsqlite "git.arav.su/Arav/justguestbook/database/sqlite"
|
||||
)
|
||||
|
||||
var version string
|
||||
@ -50,7 +51,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
guestbookDB, err := sqlite.New(path.Join(*databasesPath, "guestbook.sqlite"))
|
||||
guestbookDB, err := gbsqlite.New(path.Join(*databasesPath, "guestbook.sqlite"))
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
@ -92,7 +93,12 @@ func main() {
|
||||
srv.PATCH("/api/guestbook/:id/reply", guestbookApi.EditReply)
|
||||
srv.DELETE("/api/guestbook/:id/reply", guestbookApi.DeleteReply)
|
||||
|
||||
mindflowApi := http.NewMindflowApiHandlers()
|
||||
mindflowDB, err := sqlite.NewSQLiteMindflow(path.Join(*databasesPath, "mindflow.sqlite"))
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
mindflowApi := http.NewMindflowApiHandlers(mindflowDB)
|
||||
|
||||
srv.POST("/api/mindflow", mindflowApi.New)
|
||||
srv.POST("/api/mindflow/:id", mindflowApi.Edit)
|
||||
|
Loading…
Reference in New Issue
Block a user