Skip to content

Commit

Permalink
Merge pull request #234 from uasoft-indonesia/bugfix/v2/swagger-file-…
Browse files Browse the repository at this point in the history
…permission

[badaso v2] add permission generate file docs and api-docs.json 0775
  • Loading branch information
rizkiheryandi authored Jul 4, 2021
2 parents 91c0beb + f489f49 commit 11d48c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Helpers/ApiDocs.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,9 @@ public static function generateAPIDocs($table_name, $data_rows, $data_type)
$stub = self::getStub($table_name, $data_rows, $data_type);

$status_put_file = $filesystem->put($file_path, $stub);
if ($status_put_file) {
chmod($file_path, 0775);
}

return $status_put_file;
}
Expand Down
1 change: 1 addition & 0 deletions src/Middleware/GenerateForSwagger.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public function handle($request, Closure $next)
}

Artisan::call('l5-swagger:generate');
chmod(storage_path('api-docs/api-docs.json'), 0775);
break;
}

Expand Down

0 comments on commit 11d48c5

Please sign in to comment.