public async Task <IActionResult> UnlockProjectAsync(int projectId, [FromServices] IUnlockProjectCommand command) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } string user = User.Identity.Name; await command.ExecuteAsync(projectId, user); return(Ok()); }
public async Task <IActionResult> UnlockProjectAsync(int projectId, [FromServices] IUnlockProjectCommand command) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var userId = 1; // From identity await command.ExecuteAsync(projectId, userId); return(Ok()); }