mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-14 12:04:41 +00:00
Make invites use store (#92)
This commit is contained in:
@@ -25,3 +25,13 @@ func FromAccount(acc *auth.Account) string {
|
||||
}
|
||||
return fmt.Sprintf("%s/%s", acc.Issuer, owner)
|
||||
}
|
||||
|
||||
// CreateKey generated a unique key for a resource
|
||||
func CreateKey(ctx context.Context, key string) string {
|
||||
t, ok := FromContext(ctx)
|
||||
if !ok {
|
||||
return key
|
||||
}
|
||||
// return a tenant prefixed key e.g micro/asim/foobar
|
||||
return fmt.Sprintf("%s/%s", t, key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user