mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-24 08:22:29 +02:00
24 lines
513 B
Go
24 lines
513 B
Go
package app
|
|
|
|
import (
|
|
"database/sql"
|
|
|
|
"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 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)
|
|
}
|