portfolio/api/service/validate/validateUser.go

14 lines
173 B
Go
Raw Normal View History

2024-03-13 15:54:09 +01:00
package validate
import (
2024-05-15 15:49:39 +02:00
"portfolio_api/database/ent"
2024-03-13 15:54:09 +01:00
)
func UserIsValid(u *ent.User) bool {
if len(u.Name) > 0 &&
len(u.Role) > 0 {
return true
}
return false
}