mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-27 08:31:20 +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"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/mattermost/focalboard/server/utils"
|
||||||
mmModel "github.com/mattermost/mattermost-server/v6/model"
|
mmModel "github.com/mattermost/mattermost-server/v6/model"
|
||||||
|
|
||||||
pluginapi "github.com/mattermost/mattermost-plugin-api"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -276,7 +275,7 @@ func IsErrNotFound(err error) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check if this is a plugin API error
|
// check if this is a plugin API error
|
||||||
if errors.Is(err, pluginapi.ErrNotFound) {
|
if utils.IsPluginAPINotFound(err) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,9 +2,11 @@ package utils
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"reflect"
|
"reflect"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
pluginapi "github.com/mattermost/mattermost-plugin-api"
|
||||||
mmModel "github.com/mattermost/mattermost-server/v6/model"
|
mmModel "github.com/mattermost/mattermost-server/v6/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -119,3 +121,7 @@ func DedupeStringArr(arr []string) []string {
|
|||||||
|
|
||||||
return dedupedArr
|
return dedupedArr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func IsPluginAPINotFound(err error) bool {
|
||||||
|
return errors.Is(err, pluginapi.ErrNotFound)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user