fix (patient): fix condition
This commit is contained in:
@@ -39,7 +39,7 @@ func Create(input e.CreateDto) (*d.Data, error) {
|
||||
pl.SetLogInfo(&event, input, "started", "create")
|
||||
mwRunner := newMiddlewareRunner(&event)
|
||||
|
||||
if !input.AuthInfo.IsReg() || !input.AuthInfo.IsSys() {
|
||||
if !input.AuthInfo.IsReg() && !input.AuthInfo.IsSys() {
|
||||
event.Status = "failed"
|
||||
event.ErrInfo = pl.ErrorInfo{
|
||||
Code: "auth-forbidden",
|
||||
@@ -255,7 +255,7 @@ func Update(input e.UpdateDto) (*d.Data, error) {
|
||||
pl.SetLogInfo(&event, input, "started", "update")
|
||||
mwRunner := newMiddlewareRunner(&event)
|
||||
|
||||
if !input.AuthInfo.IsReg() || !input.AuthInfo.IsSys() {
|
||||
if !input.AuthInfo.IsReg() && !input.AuthInfo.IsSys() {
|
||||
event.Status = "failed"
|
||||
event.ErrInfo = pl.ErrorInfo{
|
||||
Code: "auth-forbidden",
|
||||
|
||||
Reference in New Issue
Block a user