Skip to content

Commit

Permalink
feat: add api for get archive repo data (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
hunjixin authored Mar 24, 2024
1 parent 8237cb1 commit 2f4cbd7
Show file tree
Hide file tree
Showing 16 changed files with 1,185 additions and 158 deletions.
4 changes: 2 additions & 2 deletions api/custom_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ func (response *JiaozifsResponse) Unauthorized() {
response.WriteHeader(http.StatusUnauthorized)
}

func (response *JiaozifsResponse) BadRequest(msg string) {
func (response *JiaozifsResponse) BadRequest(msg string, args ...any) {
response.WriteHeader(http.StatusBadRequest)
_, _ = response.Write([]byte(msg))
_, _ = response.Write([]byte(fmt.Sprintf(msg, args...)))
}

// Error response with 500 and error message
Expand Down
Loading

0 comments on commit 2f4cbd7

Please sign in to comment.