Made some small adjustments to e7da8c9443
This commit is contained in:
@@ -25,20 +25,7 @@ type ExpenseShare struct {
|
|||||||
ShareCents int64 `json:"share_cents"`
|
ShareCents int64 `json:"share_cents"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Role int
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
RoleUser = iota
|
RoleUser = "user"
|
||||||
RoleAdmin
|
RoleAdmin = "admin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (r Role) String() string {
|
|
||||||
switch r {
|
|
||||||
case RoleUser:
|
|
||||||
return "user"
|
|
||||||
case RoleAdmin:
|
|
||||||
return "admin"
|
|
||||||
default:
|
|
||||||
return "unknown"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user