respond with http 302
This commit is contained in:
@@ -42,10 +42,6 @@ type TimeData struct {
|
|||||||
GameID int32 `json:"game_id"`
|
GameID int32 `json:"game_id"`
|
||||||
} // @name Time
|
} // @name Time
|
||||||
|
|
||||||
type BotDownloadUrl struct {
|
|
||||||
Url string `json:"url"`
|
|
||||||
} // @name BotDownloadUrl
|
|
||||||
|
|
||||||
// FromGRPC converts a TimeResponse protobuf message to a TimeData domain object
|
// FromGRPC converts a TimeResponse protobuf message to a TimeData domain object
|
||||||
func (t *TimeData) FromGRPC(resp *times.TimeResponse) *TimeData {
|
func (t *TimeData) FromGRPC(resp *times.TimeResponse) *TimeData {
|
||||||
if resp == nil {
|
if resp == nil {
|
||||||
|
|||||||
@@ -485,9 +485,5 @@ func (h *TimesHandler) GetDownloadUrl(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return the download url
|
// Return the download url
|
||||||
ctx.JSON(http.StatusOK, dto.Response[dto.BotDownloadUrl]{
|
ctx.Redirect(http.StatusFound, info.Url)
|
||||||
Data: dto.BotDownloadUrl{
|
|
||||||
Url: info.Url,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user