mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
66975bdfe9
* first pass linter cleanup * address review comments
25 lines
532 B
Go
25 lines
532 B
Go
package app
|
|
|
|
import (
|
|
"database/sql"
|
|
"errors"
|
|
|
|
"github.com/mattermost/focalboard/server/model"
|
|
"github.com/mattermost/focalboard/server/services/store"
|
|
)
|
|
|
|
func (a *App) GetSharing(c store.Container, rootID string) (*model.Sharing, error) {
|
|
sharing, err := a.store.GetSharing(c, rootID)
|
|
if errors.Is(err, sql.ErrNoRows) {
|
|
return nil, nil
|
|
}
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return sharing, nil
|
|
}
|
|
|
|
func (a *App) UpsertSharing(c store.Container, sharing model.Sharing) error {
|
|
return a.store.UpsertSharing(c, sharing)
|
|
}
|