chore: running formatter
This commit is contained in:
parent
ae11ee7ed8
commit
fad708e08d
|
@ -54,7 +54,7 @@ func (d *Dependencies) AddNewJoke(c *fiber.Ctx) error {
|
||||||
if err != nil && err != pgx.ErrNoRows {
|
if err != nil && err != pgx.ErrNoRows {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err == nil && validateLink != "" {
|
if err == nil && validateLink != "" {
|
||||||
return c.Status(fiber.StatusConflict).JSON(Error{
|
return c.Status(fiber.StatusConflict).JSON(Error{
|
||||||
Error: "Given link is already on the jokesbapak2 database",
|
Error: "Given link is already on the jokesbapak2 database",
|
||||||
|
|
|
@ -44,20 +44,19 @@ func setup() error {
|
||||||
}
|
}
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
|
dj, err := db.Query(ctx, "DROP TABLE \"jokesbapak2\"")
|
||||||
|
if err != nil {
|
||||||
|
log.Println("busy here - 57")
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer dj.Close()
|
||||||
|
|
||||||
dj, err := db.Query(ctx, "DROP TABLE \"jokesbapak2\"")
|
ds, err := db.Query(ctx, "DROP TABLE \"submission\"")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("busy here - 57")
|
log.Println("busy here - 67")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer dj.Close()
|
defer ds.Close()
|
||||||
|
|
||||||
ds, err := db.Query(ctx, "DROP TABLE \"submission\"")
|
|
||||||
if err != nil {
|
|
||||||
log.Println("busy here - 67")
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer ds.Close()
|
|
||||||
|
|
||||||
da, err := db.Query(ctx, "DROP TABLE \"administrators\"")
|
da, err := db.Query(ctx, "DROP TABLE \"administrators\"")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue