fix: don't record log if staff
This commit is contained in:
parent
d8f6968f64
commit
0c8133c802
@ -34,12 +34,13 @@ func GetBySlug(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
userDetail, _ := utils.GetTokenDetail(r)
|
||||||
|
|
||||||
|
if userDetail.Role != "staff" {
|
||||||
var specReq logsdomain.LogsSpec
|
var specReq logsdomain.LogsSpec
|
||||||
|
|
||||||
specReq.ContentID = news.ID
|
specReq.ContentID = news.ID
|
||||||
|
|
||||||
userDetail, _ := utils.GetTokenDetail(r)
|
|
||||||
|
|
||||||
if userDetail.ID != "" {
|
if userDetail.ID != "" {
|
||||||
specReq.UserID = &userDetail.ID
|
specReq.UserID = &userDetail.ID
|
||||||
}
|
}
|
||||||
@ -69,6 +70,7 @@ func GetBySlug(
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
response.RespondJsonSuccess(ctx, w, news)
|
response.RespondJsonSuccess(ctx, w, news)
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user