1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00
focalboard/server/app/category_boards.go
Jesús Espino bc37e97ae9
Applying migration changes (#2752)
* Applying migration changes

* Fixing linter erros

* Restoring userID

* Updated user id length

* Update server/app/category_boards.go

* Skiped creating categories for boards belonging to DMs

* Handled private group messages as well

* fix sql error for insert_at

* fix timestamp parsing

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2022-04-13 16:10:53 -06:00

28 lines
654 B
Go

package app
import "github.com/mattermost/focalboard/server/model"
func (a *App) GetUserCategoryBoards(userID, teamID string) ([]model.CategoryBoards, error) {
return a.store.GetUserCategoryBoards(userID, teamID)
}
func (a *App) AddUpdateUserCategoryBoard(teamID, userID, categoryID, boardID string) error {
err := a.store.AddUpdateCategoryBoard(userID, categoryID, boardID)
if err != nil {
return err
}
a.blockChangeNotifier.Enqueue(func() error {
a.wsAdapter.BroadcastCategoryBoardChange(
teamID,
userID,
model.BoardCategoryWebsocketData{
BoardID: boardID,
CategoryID: categoryID,
})
return nil
})
return nil
}