Ejemplo n.º 1
0
// ToUser converts a UserRequest object to User
func (req *UserRequest) ToUser() table.User {
	var user table.User
	user.ClientID = req.ClientID
	user.Firstname = req.Firstname
	user.Lastname = req.Lastname
	return user
}
Ejemplo n.º 2
0
// ToUser converts an AdminLoginRequest object to User
func (req *AdminLoginRequest) ToUser() table.User {
	var user table.User
	user.Email = req.Email
	user.Password = req.Password
	return user
}