diff options
author | matthewsotoudeh <matthewsot@outlook.com> | 2015-04-26 13:36:20 -0700 |
---|---|---|
committer | matthewsotoudeh <matthewsot@outlook.com> | 2015-04-26 13:36:20 -0700 |
commit | 902848a459c461c453a7598798174949402bf5f0 (patch) | |
tree | e1a2f71a382c0c2cab08c9ad47072d1b798d78d6 | |
parent | 61dbd4973678406ee59c99502a8715507f2fb6f3 (diff) |
moved account API models to their own file
-rw-r--r-- | Classfinder/Classfinder/Classfinder.csproj | 1 | ||||
-rw-r--r-- | Classfinder/Classfinder/Controllers/AccountAPIController.cs | 36 | ||||
-rw-r--r-- | Classfinder/Classfinder/Models/AccountAPIModels.cs | 42 |
3 files changed, 43 insertions, 36 deletions
diff --git a/Classfinder/Classfinder/Classfinder.csproj b/Classfinder/Classfinder/Classfinder.csproj index 5431df1..5870870 100644 --- a/Classfinder/Classfinder/Classfinder.csproj +++ b/Classfinder/Classfinder/Classfinder.csproj @@ -223,6 +223,7 @@ <DependentUpon>201407112343348_Schools.cs</DependentUpon> </Compile> <Compile Include="Migrations\Configuration.cs" /> + <Compile Include="Models\AccountAPIModels.cs" /> <Compile Include="Models\AccountViewModels.cs" /> <Compile Include="Models\Database.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> diff --git a/Classfinder/Classfinder/Controllers/AccountAPIController.cs b/Classfinder/Classfinder/Controllers/AccountAPIController.cs index 7298371..627de7d 100644 --- a/Classfinder/Classfinder/Controllers/AccountAPIController.cs +++ b/Classfinder/Classfinder/Controllers/AccountAPIController.cs @@ -10,47 +10,11 @@ using Microsoft.AspNet.Identity.Owin; namespace Classfinder.Controllers { - public class SignUpModel - { - public string Password { get; set; } - public int GradYear { get; set; } - public string School { get; set; } - public string FullName { get; set; } - public string Username { get; set; } - public string Email { get; set; } - } - - public class ResetPassModel - { - public string Username { get; set; } - } - public class ChangePasswordModel - { - public string OldPassword { get; set; } - public string NewPassword { get; set; } - } - public class ChangeUsernameModel - { - public string NewUsername { get; set; } - } - public class ChangeNameModel - { - public string NewName { get; set; } - } - - public class ResetPasswordModel - { - public string token { get; set; } - public string userId { get; set; } - public string newPassword { get; set; } - } - [Authorize] public class AccountAPIController : ApiController { private CfDb db = new CfDb(); - //modified from the lhs-campaign source ;) https://github.com/matthewsot/lhs-campaign file /Controllers/AccountsAPIController.cs [HttpPost] [Route("API/Account/SignUp")] [AllowAnonymous] diff --git a/Classfinder/Classfinder/Models/AccountAPIModels.cs b/Classfinder/Classfinder/Models/AccountAPIModels.cs new file mode 100644 index 0000000..645edf4 --- /dev/null +++ b/Classfinder/Classfinder/Models/AccountAPIModels.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace Classfinder.Models +{ + public class SignUpModel + { + public string Password { get; set; } + public int GradYear { get; set; } + public string School { get; set; } + public string FullName { get; set; } + public string Username { get; set; } + public string Email { get; set; } + } + + public class ResetPassModel + { + public string Username { get; set; } + } + public class ChangePasswordModel + { + public string OldPassword { get; set; } + public string NewPassword { get; set; } + } + public class ChangeUsernameModel + { + public string NewUsername { get; set; } + } + public class ChangeNameModel + { + public string NewName { get; set; } + } + + public class ResetPasswordModel + { + public string token { get; set; } + public string userId { get; set; } + public string newPassword { get; set; } + } +}
\ No newline at end of file |