-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature-onboard-user' of github.com:uug-ai/facial-acces…
…s-control into feature-onboard-user
- Loading branch information
Showing
48 changed files
with
1,067 additions
and
2,338 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ ml/data/face_inference.mp4 | |
ml/data/test_images | ||
node_modules | ||
ui/out | ||
__debug_bin* | ||
__debug_bin* | ||
api/__debug_bin* |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
EMAIL = "[email protected]" | ||
PASSWORD = "password" |
Empty file.
Empty file.
Binary file not shown.
Empty file.
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
package data | ||
|
||
import "github.com/uug-ai/facial-access-control/api/models" | ||
import ( | ||
"log" | ||
|
||
"github.com/uug-ai/facial-access-control/api/models" | ||
"github.com/uug-ai/facial-access-control/api/utils" | ||
) | ||
|
||
var Users = []models.User{ | ||
{Id: 0, FirstName: "admin", LastName: "admin", Email: "[email protected]", Password: "admin", Role: "admin", Language: "en", Status: "pending"}, | ||
|
@@ -22,5 +27,14 @@ var Locations = []models.Location{ | |
{Id: 4, Name: "Location 4", Address: "Address 4", Lat: 4.0, Lng: 4.0}, | ||
} | ||
|
||
|
||
// Initialize function to hash passwords | ||
func Initialize() { | ||
for i, user := range Users { | ||
hashedPassword, err := utils.Hash(user.Password) | ||
if err != nil { | ||
log.Fatalf("Error hashing password for user %s: %v", user.Email, err) | ||
} | ||
Users[i].Password = hashedPassword | ||
} | ||
} | ||
|
This file contains 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 characters
This file contains 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 characters
Oops, something went wrong.