focalboard/server/app/sharing.go

23 lines
411 B
Go
Raw Normal View History

2021-01-13 00:35:30 +01:00
package app
import (
"database/sql"
2021-01-26 23:13:46 +01:00
"github.com/mattermost/focalboard/server/model"
2021-01-13 00:35:30 +01:00
)
func (a *App) GetSharing(rootID string) (*model.Sharing, error) {
sharing, err := a.store.GetSharing(rootID)
if err == sql.ErrNoRows {
return nil, nil
}
if err != nil {
return nil, err
}
return sharing, nil
}
func (a *App) UpsertSharing(sharing model.Sharing) error {
return a.store.UpsertSharing(sharing)
}