Skip to content

Commit aa4dd3e

Browse files
author
Jarosław Kopczyński
committed
fix awaiting to get current user, because not waiting a result and not throwing exception
1 parent e0e9382 commit aa4dd3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/AbpProjectNameAppServiceBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ protected AbpProjectNameAppServiceBase()
2323
LocalizationSourceName = AbpProjectNameConsts.LocalizationSourceName;
2424
}
2525

26-
protected virtual Task<User> GetCurrentUserAsync()
26+
protected virtual async Task<User> GetCurrentUserAsync()
2727
{
28-
var user = UserManager.FindByIdAsync(AbpSession.GetUserId().ToString());
28+
var user = await UserManager.FindByIdAsync(AbpSession.GetUserId().ToString());
2929
if (user == null)
3030
{
3131
throw new Exception("There is no current user!");

0 commit comments

Comments
 (0)