1
0
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:
Lev Brouk 2023-01-31 09:18:22 -08:00
parent a2366caa43
commit 49f28ae66f
2 changed files with 8 additions and 3 deletions

View File

@ -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
}

View File

@ -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)
}