update
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import type { HttpContext } from '@adonisjs/core/http'
|
||||
|
||||
export default class TenantController {
|
||||
/**
|
||||
* @summary Resolve current tenant context
|
||||
* @responseBody 200 - {"tenant":{"id":42,"name":"Acme GmbH","slug":"acme-gmbh"}}
|
||||
* @responseBody 400 - {"code":"E_TENANT_REQUIRED","message":"The X-Tenant-Id header is required."}
|
||||
* @responseBody 403 - {"code":"E_TENANT_ACCESS_DENIED","message":"You do not have access to this tenant."}
|
||||
*/
|
||||
async current({ response, tenant }: HttpContext) {
|
||||
return response.ok({ tenant })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user