hot fix api issue
This commit is contained in:
parent
972e4b5ade
commit
c0265fee8b
|
@ -21,6 +21,14 @@ use Appwrite\Network\Validator\Domain as DomainValidator;
|
|||
use Appwrite\Utopia\Response;
|
||||
use Cron\CronExpression;
|
||||
|
||||
App::init(function ($project) {
|
||||
/** @var Utopia\Database\Document $project */
|
||||
|
||||
if($project->getId() !== 'console') {
|
||||
throw new Exception('Access to this API is forbidden.', 401);
|
||||
}
|
||||
}, ['project'], 'projects');
|
||||
|
||||
App::post('/v1/projects')
|
||||
->desc('Create Project')
|
||||
->groups(['api', 'projects'])
|
||||
|
|
|
@ -79,6 +79,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
|||
<div
|
||||
data-service="projects.getUsage"
|
||||
data-event="load"
|
||||
data-scope="console"
|
||||
data-name="usage"
|
||||
data-param-project-id="{{router.params.project}}"
|
||||
data-param-range="30d">
|
||||
|
|
Loading…
Reference in a new issue