chore: running formatter

This commit is contained in:
Reinaldy Rafli 2021-09-28 11:29:54 +07:00
parent ae11ee7ed8
commit fad708e08d
No known key found for this signature in database
GPG Key ID: CFDB9400255D8CB6
2 changed files with 13 additions and 14 deletions

View File

@ -54,7 +54,7 @@ func (d *Dependencies) AddNewJoke(c *fiber.Ctx) error {
if err != nil && err != pgx.ErrNoRows {
return err
}
if err == nil && validateLink != "" {
return c.Status(fiber.StatusConflict).JSON(Error{
Error: "Given link is already on the jokesbapak2 database",

View File

@ -44,20 +44,19 @@ func setup() error {
}
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\"")
if err != nil {
log.Println("busy here - 57")
return err
}
defer dj.Close()
ds, err := db.Query(ctx, "DROP TABLE \"submission\"")
if err != nil {
log.Println("busy here - 67")
return err
}
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\"")
if err != nil {