Fixes
This commit is contained in:
1 parent
04794aea54
commit
cfd31f398c
61 files changed
+2062
-254
No files matched your search
@@ -77,7 +77,11 @@ func (s *Service) loadFeedSource(ctx context.Context, companyID uuid.UUID, feed
|
||||
if urlStr == "" {
|
||||
return nil, errSourceRequired
|
||||
}
|
||||
return downloadFeed(ctx, urlStr)
|
||||
headers, err := decryptFeedHeaders(feed["options"])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return downloadFeedWithHeaders(ctx, urlStr, headers)
|
||||
}
|
||||
|
||||
func sourcePathFromOptions(raw any) string {
|
||||
@@ -121,6 +125,8 @@ func (s *Service) readLocalFeed(companyID uuid.UUID, rel string) (*feedBlob, err
|
||||
lower := strings.ToLower(abs)
|
||||
if strings.HasSuffix(lower, ".xml") {
|
||||
ct = "application/xml"
|
||||
} else if strings.HasSuffix(lower, ".json") {
|
||||
ct = "application/json"
|
||||
}
|
||||
return &feedBlob{
|
||||
path: abs,
|
||||
|
||||
Reference in new issue
Block a user