Skip to content

Commit 9f51f36

Browse files
Patrick-Isidoroecanuto
authored andcommitted
Rename slug var to id on responses
1 parent 7f4d8ac commit 9f51f36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ func main() {
9393
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
9494
return
9595
}
96-
slug, err := store.Set(data.URL)
96+
id, err := store.Set(data.URL)
9797
if err != nil {
9898
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
9999
return
100100
}
101101

102-
c.JSON(http.StatusOK, gin.H{"id": slug, "link": address + slug})
102+
c.JSON(http.StatusOK, gin.H{"id": id, "link": address + id})
103103
})
104104
log.Fatal(r.Run(port))
105105
}

0 commit comments

Comments
 (0)