Skip to content

Commit d3eb219

Browse files
committed
chore: added the swagger docs'
1 parent 7961dc3 commit d3eb219

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd/api/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"database/sql"
55
"log"
66

7-
_ "github.com/kunalkumar-1/Evently/docs"
87
_ "github.com/joho/godotenv/autoload"
8+
_ "github.com/kunalkumar-1/Evently/docs"
99
"github.com/kunalkumar-1/Evently/internals/database"
1010
"github.com/kunalkumar-1/Evently/internals/env"
1111
_ "github.com/mattn/go-sqlite3"

cmd/api/routes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ func (app *application) routes() http.Handler {
3131
auth.DELETE("/events/:id/attendees/:userId", app.deleteAttendeeFromEvent) // delete attendee from event
3232
}
3333

34-
r.GET("/swagger/*any", func(c *gin.Context){
34+
r.GET("/swagger/*any", func(c *gin.Context) {
3535
if c.Request.RequestURI == "/swagger/" {
36-
c.Redirect(302, "/swagger/index.html")
36+
c.Redirect(302, "/swagger/index.html")
3737
}
3838
ginSwagger.WrapHandler(swaggerFiles.Handler, ginSwagger.URL("http://localhost:8080/swagger/doc.json"))(c)
3939
})

0 commit comments

Comments
 (0)