Last active
May 13, 2021 10:33
-
-
Save Solution/44c2e69acd24d9f484d5a5ab3bf72014 to your computer and use it in GitHub Desktop.
Revisions
-
Solution revised this gist
May 13, 2021 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,16 @@ type User struct { gorm.Model Username string Firstname string Surname string Email string Phone string Password string Role string Active bool } FindExistingUser(username string) model.User { var user model.User database.Where("username = ?", username).First(&user) -
Solution revised this gist
May 13, 2021 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ FindExistingUser(username string) model.User { var user model.User database.Where("username = ?", username).First(&user) return user } -
Solution created this gist
May 13, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ FindExistingUser(username string) model.User { database.Where("username = ?", username).First(&user) return user }