mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-24 08:22:29 +02:00
moved mattermost-plugin-api dependency from model to utils
This commit is contained in:
parent
a2366caa43
commit
49f28ae66f
@ -7,9 +7,8 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/mattermost/focalboard/server/utils"
|
||||
mmModel "github.com/mattermost/mattermost-server/v6/model"
|
||||
|
||||
pluginapi "github.com/mattermost/mattermost-plugin-api"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -276,7 +275,7 @@ func IsErrNotFound(err error) bool {
|
||||
}
|
||||
|
||||
// check if this is a plugin API error
|
||||
if errors.Is(err, pluginapi.ErrNotFound) {
|
||||
if utils.IsPluginAPINotFound(err) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,11 @@ package utils
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
pluginapi "github.com/mattermost/mattermost-plugin-api"
|
||||
mmModel "github.com/mattermost/mattermost-server/v6/model"
|
||||
)
|
||||
|
||||
@ -119,3 +121,7 @@ func DedupeStringArr(arr []string) []string {
|
||||
|
||||
return dedupedArr
|
||||
}
|
||||
|
||||
func IsPluginAPINotFound(err error) bool {
|
||||
return errors.Is(err, pluginapi.ErrNotFound)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user