Can now run ChromeDP to automate the browser based testing.
This commit is contained in:
parent
81aaffec56
commit
b28e507e5e
6 changed files with 72 additions and 7 deletions
8
main.go
8
main.go
|
@ -11,10 +11,7 @@ import (
|
|||
"github.com/jmoiron/sqlx"
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
"github.com/gofiber/fiber/v2/middleware/recover"
|
||||
"github.com/gofiber/fiber/v2/middleware/encryptcookie"
|
||||
"github.com/gofiber/fiber/v2/middleware/session"
|
||||
"github.com/gofiber/fiber/v2/middleware/helmet"
|
||||
"github.com/gofiber/fiber/v2/middleware/basicauth"
|
||||
)
|
||||
|
||||
type Link struct {
|
||||
|
@ -50,6 +47,9 @@ func main() {
|
|||
|
||||
// handler that returns one json from a sql database
|
||||
app.Get("/api/stream/", func (c *fiber.Ctx) error {
|
||||
sess, err := store.Get(c)
|
||||
sess.Set("fuck", "off")
|
||||
|
||||
sql, args, err := sq.Select("*").From("stream").ToSql()
|
||||
return tools.SelectJson[Stream](db, c, err, sql, args...)
|
||||
})
|
||||
|
@ -78,7 +78,7 @@ func main() {
|
|||
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
c.Redirect("/live/")
|
||||
return c.Redirect("/live/")
|
||||
} else {
|
||||
return c.Redirect("/live/")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue