Deploy Bots API #28

Merged
Quaternions merged 34 commits from staging into master 2026-02-28 02:33:43 +00:00
Showing only changes of commit 5a9bc0ea6c - Show all commits

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"math"
"net/http"
"net/url"
"strconv"
"strings"
@@ -406,7 +407,19 @@ func (h *TimesHandler) GetDownloadUrl(ctx *gin.Context) {
// fetch download url from storage service
// Build the full URL.
fullURL := h.url + botData.FileID
fullURL, err := url.JoinPath(h.url, botData.FileID)
if err != nil {
statusCode := http.StatusInternalServerError
errorMessage := "Error joining Url"
ctx.JSON(statusCode, dto.Error{
Error: errorMessage,
})
log.WithError(err).Error(
"Error joining Url",
)
return
}
// Create the request with the supplied context so callers can cancel it.
req, err := http.NewRequestWithContext(ctx, http.MethodGet, fullURL, nil)