Skip to content

Commit a01fafb

Browse files
committed
feat: HEAD메서드 ping endpoint 추가
1 parent 5870452 commit a01fafb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

internal/http/handler/pinghandler.go

+4
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ import "github.com/gin-gonic/gin"
55
func PingPong(context *gin.Context) {
66
context.String(200, "pong\n")
77
}
8+
9+
func DoNothing(context *gin.Context) {
10+
context.Status(200)
11+
}

internal/http/router/router.go

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
func InitRouter(r *gin.Engine, client *ent.Client) {
1010
// PingPong 테스트
1111
r.GET("/ping", handler.PingPong)
12+
r.HEAD("/ping", handler.DoNothing)
1213

1314
// 회사 리스트 조회
1415
// curl -X GET http://localhost:8080/companies

0 commit comments

Comments
 (0)