solve conflict
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package synccfg
|
||||
|
||||
var O SyncConsumerUrlCfg = SyncConsumerUrlCfg{} // old
|
||||
var O SyncUrlCfg = SyncUrlCfg{} // new
|
||||
|
||||
type SyncConsumerUrlCfg struct {
|
||||
type SyncUrlCfg struct {
|
||||
Prefix string `yaml:"prefix"`
|
||||
TargetHost string `yaml:"targetHost"`
|
||||
Enable bool `yaml:"enable"`
|
||||
|
||||
@@ -81,7 +81,7 @@ func GuardMW(next http.Handler) http.Handler {
|
||||
credential.UserName = r.Header.Get("X-Sync-UserName")
|
||||
if credential.Source != "" || credential.SecretKey != "" || credential.UserName != "" {
|
||||
// validate secretKey and source
|
||||
if credential.SecretKey != is.O.SecretKey || credential.Source != is.O.OldSource {
|
||||
if credential.SecretKey != is.O.SecretKey || credential.Source != is.O.Source {
|
||||
rw.WriteJSON(w, http.StatusUnauthorized, d.IS{"message": "invalid consumer credential"}, nil)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package soapi
|
||||
import (
|
||||
e "simrs-vx/internal/domain/main-entities/soapi"
|
||||
esync "simrs-vx/internal/domain/sync-entities/log"
|
||||
sync "simrs-vx/internal/infra/sync-cfg"
|
||||
sync "simrs-vx/internal/infra/sync-consumer-cfg"
|
||||
pl "simrs-vx/pkg/logger"
|
||||
pu "simrs-vx/pkg/use-case-helper"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package soapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
sync "simrs-vx/internal/infra/sync-cfg"
|
||||
sync "simrs-vx/internal/infra/sync-consumer-cfg"
|
||||
helper "simrs-vx/internal/use-case/simgos-sync-plugin/new"
|
||||
|
||||
e "simrs-vx/internal/domain/main-entities/soapi"
|
||||
|
||||
Reference in New Issue
Block a user