Added code to support password settings. Fixed a bug where the [FromBody] attribute resulted in null object properties, as well as included more null checks.

This commit is contained in:
2021-03-09 22:14:29 -06:00
parent 70bb9dd9e2
commit 7008621799
53 changed files with 157 additions and 4377 deletions
@@ -403,14 +403,20 @@ BEGIN
BEGIN TRANSACTION;
IF dbo.UserExists(@UserName) = 1
BEGIN;
THROW 51000, 'User already exists', 1;
THROW 51000, 'This username is already in use', 1;
END;
IF dbo.EmailInUse(@Email) = 1
BEGIN;
THROW 51001, 'This email is already in use', 1
END;
SELECT @EventID = [Event ID] FROM [Event] WHERE [Event Name] = 'Registration'
IF @EventID = NULL OR @EventID = 0
BEGIN;
THROW 51001, 'Registration event type not found', 1;
THROW 51002, 'Registration event type not found', 1;
END;
INSERT INTO [User] (Name, Email) VALUES (@UserName, @Email)