1
0
Fork 0
mirror of synced 2024-06-17 02:04:56 +12:00

Merge pull request #1453 from appwrite/hot-fix-api

hot fix project api issue
This commit is contained in:
Eldad A. Fux 2021-08-01 14:48:44 +03:00 committed by GitHub
commit db6c24de5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -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'])

View file

@ -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">