mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-08 12:09:43 +03:00
9fe573a0c5
- Simplify the `init` method in `models/index.js` so that it no longer returns a promise. Easier to use. - Eliminates the `deleteAllContent` method from `models/index.js` as it can all be handled at the API layer in a single spot. - Optimize `destroyAllContent` in `api/db.js`. Eliminates double-fetching every post from the database and converting it to JSON. Also only fetches ids from the database instead of the entire model. - Eliminates the custom static method `destroy` in the Post model in favor of handling detaching tag relations in a single place (the `destroying` event). This also eliminates a big source of unneeded database round trips--needing to get post ids to feed into `Post.destroy()` which then re-fetches the post again. |
||
---|---|---|
.. | ||
controllers/frontend | ||
metadata | ||
middleware | ||
models_plugins | ||
server_helpers | ||
api_utils_spec.js | ||
apps_filters_spec.js | ||
apps_spec.js | ||
config_spec.js | ||
error_handling_spec.js | ||
exporter_spec.js | ||
filters_spec.js | ||
ghost_url_spec.js | ||
importer_spec.js | ||
mail_spec.js | ||
migration_fixture_spec.js | ||
migration_spec.js | ||
permissions_spec.js | ||
rss_spec.js | ||
server_helpers_index_spec.js | ||
server_helpers_template_spec.js | ||
server_spec.js | ||
server_utils_spec.js | ||
showdown_client_integrated_spec.js | ||
sitemap_spec.js | ||
storage_local-file-store_spec.js | ||
utils_pipeline_spec.js | ||
versioning_spec.js | ||
xmlrpc_spec.js |