Fix 200 response exception builder
Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
@@ -196,5 +196,12 @@ func CheckinQuery(c *gin.Context) {
|
||||
CheckinAt time.Time `json:"checkin_at"`
|
||||
}{attendance.CheckinAt}
|
||||
|
||||
utils.HttpResponse(c, 200, "", "success", checkInAtResp)
|
||||
errorCode := new(exception.Builder).
|
||||
SetStatus(exception.StatusUser).
|
||||
SetService(exception.ServiceEvent).
|
||||
SetEndpoint(exception.EndpointEventServiceCheckinQuery).
|
||||
SetType(exception.TypeCommon).
|
||||
SetOriginal(exception.CommonSuccess).
|
||||
Build()
|
||||
utils.HttpResponse(c, 200, errorCode, checkInAtResp)
|
||||
}
|
||||
|
||||
@@ -60,5 +60,12 @@ func Info(c *gin.Context) {
|
||||
EndTime time.Time `json:"end_time"`
|
||||
}{event.Name, event.StartTime, event.EndTime}
|
||||
|
||||
utils.HttpResponse(c, 200, "", "success", eventInfoResp)
|
||||
errorCode := new(exception.Builder).
|
||||
SetStatus(exception.StatusUser).
|
||||
SetService(exception.ServiceEvent).
|
||||
SetEndpoint(exception.EndpointEventServiceInfo).
|
||||
SetType(exception.TypeCommon).
|
||||
SetOriginal(exception.CommonSuccess).
|
||||
Build()
|
||||
utils.HttpResponse(c, 200, errorCode, eventInfoResp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user