Skip to content

Commit 5fe52fe

Browse files
committed
[backend] Add context for future
1 parent 49a9e2c commit 5fe52fe

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package io.openaev.context;
2+
3+
import io.openaev.database.model.Tenant;
4+
5+
public class TenantContext {
6+
7+
private static final ThreadLocal<String> CURRENT_TENANT = new ThreadLocal<>();
8+
9+
public static String getCurrentTenant() {
10+
return Tenant.DEFAULT_TENANT_UUID;
11+
// return CURRENT_TENANT.get();
12+
}
13+
14+
// TODO multi-tenancy: set with Front URL instead of default UUID and update the return above
15+
public static void setCurrentTenant(String tenant) {
16+
CURRENT_TENANT.set(tenant);
17+
}
18+
}

0 commit comments

Comments
 (0)