MM-53764 - Fix: Improve limits on Opengraph Data Cache (#24177)

* enforce strict opengraph cache entry size limit

* move json marshalling and error checking into parsOpenGraphMetadata fn

* fix linting

* fix potential nil deref

* Revert "fix potential nil deref"

This reverts commit 095bcd496e9b8d97ca63d3a99e2e46eec58ef7ae.

* Revert "fix linting"

This reverts commit f3e1f7b27634ca0567fd0fef01ac23f5e39009a7.

* Revert "move json marshalling and error checking into parsOpenGraphMetadata fn"

This reverts commit ba9a1e13b0fb9d4579077b7b37666e950a5fb6ed.

* Revert "enforce strict opengraph cache entry size limit"

This reverts commit d1de4a8fa40e58ac85c85f66de27ec5aca884b18.

* remove /opengraph api endpoint

* i18n

* removing unneeded action and reducer
Этот коммит содержится в:
Christopher Poile
2023-08-17 18:23:39 -04:00
коммит произвёл GitHub
родитель ad142c958e
Коммит 7b0b0d8609
12 изменённых файлов: 0 добавлений и 253 удалений

Просмотреть файл

@@ -467,10 +467,6 @@ func (c *Client4) oAuthAppRoute(appId string) string {
return fmt.Sprintf("/oauth/apps/%v", appId)
}
func (c *Client4) openGraphRoute() string {
return "/opengraph"
}
func (c *Client4) jobsRoute() string {
return "/jobs"
}
@@ -6779,21 +6775,6 @@ func (c *Client4) GetSupportedTimezone(ctx context.Context) ([]string, *Response
return timezones, BuildResponse(r), nil
}
// Open Graph Metadata Section
// OpenGraph return the open graph metadata for a particular url if the site have the metadata.
func (c *Client4) OpenGraph(ctx context.Context, url string) (map[string]string, *Response, error) {
requestBody := make(map[string]string)
requestBody["url"] = url
r, err := c.DoAPIPost(ctx, c.openGraphRoute(), MapToJSON(requestBody))
if err != nil {
return nil, BuildResponse(r), err
}
defer closeBody(r)
return MapFromJSON(r.Body), BuildResponse(r), nil
}
// Jobs Section
// GetJob gets a single job.