mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-30 08:36:54 +02:00
08c0b7a2fd
* Refactor error usage from the store level up and add API helpers * Complete API tests * Fix merge errorResponse calls * Remove ensure helpers to allow for custom messages on permission errors * Fix bad import and call * Remove bad user check on auth that was added as part of the main merge * Fix empty list test * Replace deprecated proxy calls to ioutil.ReadAll with io.ReadAll * Add information to the NotFound errors * Add context to all remaining errors and address review comments * Fix linter * Adapt the new card API endpoints to the error refactor * Remove almost all customErrorResponse calls * Add request entity too large to errorResponse and remove customErrorResponse * Fix linter
18 lines
348 B
Go
18 lines
348 B
Go
package app
|
|
|
|
import (
|
|
"github.com/mattermost/focalboard/server/model"
|
|
)
|
|
|
|
func (a *App) GetSharing(boardID string) (*model.Sharing, error) {
|
|
sharing, err := a.store.GetSharing(boardID)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return sharing, nil
|
|
}
|
|
|
|
func (a *App) UpsertSharing(sharing model.Sharing) error {
|
|
return a.store.UpsertSharing(sharing)
|
|
}
|