[MM-25652] Add /integrity endpoint to local mode API (#15033)
* Fix direct/group channel false positives * Move public structures to model package * Expose CheckIntegrity as a local API method * Remove extra file Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c0fa478cdd
Коммит
e5edf2683d
@@ -5357,3 +5357,18 @@ func (c *Client4) UpdateSidebarCategoryForTeamForUser(userID, teamID, categoryID
|
||||
|
||||
return cat, BuildResponse(r)
|
||||
}
|
||||
|
||||
// CheckIntegrity performs a database integrity check.
|
||||
func (c *Client4) CheckIntegrity() ([]IntegrityCheckResult, *Response) {
|
||||
r, err := c.DoApiPost("/integrity", "")
|
||||
if err != nil {
|
||||
return nil, BuildErrorResponse(r, err)
|
||||
}
|
||||
defer closeBody(r)
|
||||
var results []IntegrityCheckResult
|
||||
if err := json.NewDecoder(r.Body).Decode(&results); err != nil {
|
||||
appErr := NewAppError("Api4.CheckIntegrity", "api.marshal_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
return nil, BuildErrorResponse(r, appErr)
|
||||
}
|
||||
return results, BuildResponse(r)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user