Skip to content

Commit 57c6a1e

Browse files
committed
ValidateUser method executing async
1 parent 1f24c68 commit 57c6a1e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Umbraco.Forms.Integrations.Automation.Zapier/Controllers/AuthController.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Configuration;
22
using System.Linq;
3-
4-
3+
using System.Threading.Tasks;
54
using Umbraco.Forms.Integrations.Automation.Zapier.Configuration;
65
using Umbraco.Forms.Integrations.Automation.Zapier.Models;
76

@@ -48,10 +47,11 @@ public AuthController(IUserService userService)
4847
#endif
4948

5049
[HttpPost]
51-
public bool ValidateUser([FromBody] UserModel userModel)
50+
public async Task<bool> ValidateUser([FromBody] UserModel userModel)
5251
{
5352
#if NETCOREAPP
54-
var isUserValid = _backOfficeUserManager.ValidateCredentialsAsync(userModel.Username, userModel.Password).GetAwaiter().GetResult();
53+
var isUserValid =
54+
await _backOfficeUserManager.ValidateCredentialsAsync(userModel.Username, userModel.Password);
5555
#else
5656
var isUserValid = Security.ValidateBackOfficeCredentials(userModel.Username, userModel.Password);
5757
#endif

0 commit comments

Comments
 (0)