This commit is contained in:
不做码农 2023-03-19 11:24:56 +08:00
parent 595a10bf92
commit 47edd93fe2

View File

@ -70,10 +70,6 @@ namespace ZR.Admin.WebApi.Extensions
public static long GetUId(this HttpContext context)
{
var uid = context.User.FindFirstValue(ClaimTypes.PrimarySid);
if (uid.IsEmpty() || uid.IsNullOrZero())
{
throw new CustomException(ResultCode.DENY, "未登录");
}
return !string.IsNullOrEmpty(uid) ? long.Parse(uid) : 0;
}