excellarateinc / voyage-api-dotnet

Enterprise grade C# .NET Web Services API implementing industry standard best practices
Apache License 2.0
16 stars 14 forks source link

Create admin API #147

Closed raymer closed 7 years ago

raymer commented 7 years ago

Create a new controller called AdminController

Create endpoints:

admin/users/{id}/account-status This endpoint will allow an admin to toggle the user's IsActive and/or the IsVerifyRequired flags.

Inputs: string userId, bool? isActive, bool? isVerifyRequired Calls into user service to update those flags (if not null) Return: Ok() if success, otherwise, badrequest exception if something goes wrong.

rajeshpandalss commented 7 years ago

Hey @raymer , I will start working on it from today. Looks simple to me.

Though I have a question, if IsVerifyRequired input is false, will that mean, it does not have to be toggled or we have to assign it to false as the input was false? Same with IsActive.

raymer commented 7 years ago

Hey @rajeshpandalss I made them nullable booleans in the example above so that if it comes in as null, don't update, if not null, we want to update. Let me know if you have any questions.

rajeshpandalss commented 7 years ago

I have created #152 as a PR. Let me know if you need any changes. Got delayed due to system boot issues.