Skip to content

Commit

Permalink
accept format options from request body
Browse files Browse the repository at this point in the history
  • Loading branch information
ohaibbq committed Apr 8, 2024
1 parent e0018ea commit 7753753
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1673,11 +1673,16 @@ func (h *jobsQueryHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
errorResponse(ctx, w, errInvalid(err.Error()))
return
}
useInt64Timestamp := false
if options := req.FormatOptions; options != nil {
useInt64Timestamp = options.UseInt64Timestamp
}
useInt64Timestamp = useInt64Timestamp || isFormatOptionsUseInt64Timestamp(r)
res, err := h.Handle(ctx, &jobsQueryRequest{
server: server,
project: project,
queryRequest: &req,
useInt64Timestamp: isFormatOptionsUseInt64Timestamp(r),
useInt64Timestamp: useInt64Timestamp,
})
if err != nil {
errorResponse(ctx, w, errJobInternalError(err.Error()))
Expand Down

0 comments on commit 7753753

Please sign in to comment.