mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-01 23:37:43 +03:00
Updated JSDoc optional syntax in CRUD plugin
no issue - optional parameters can be given in square brackets which makes editors understand it easier
This commit is contained in:
parent
a622f44564
commit
a635f3b68d
@ -9,7 +9,7 @@ module.exports = function (Bookshelf) {
|
||||
/**
|
||||
* ### Find All
|
||||
* Fetches all the data for a particular model
|
||||
* @param {Object} unfilteredOptions (optional)
|
||||
* @param {Object} [unfilteredOptions]
|
||||
* @return {Promise<Bookshelf['Collection']>} Collection of all Models
|
||||
*/
|
||||
findAll: async function findAll(unfilteredOptions) {
|
||||
@ -108,7 +108,7 @@ module.exports = function (Bookshelf) {
|
||||
* ### Find One
|
||||
* Naive find one where data determines what to match on
|
||||
* @param {Object} data
|
||||
* @param {Object} unfilteredOptions (optional)
|
||||
* @param {Object} [unfilteredOptions]
|
||||
* @return {Promise<Bookshelf['Model']>} Single Model
|
||||
*/
|
||||
findOne: function findOne(data, unfilteredOptions) {
|
||||
@ -137,7 +137,7 @@ module.exports = function (Bookshelf) {
|
||||
* Based on the `method` option Bookshelf and Ghost can determine if a query is an insert or an update.
|
||||
*
|
||||
* @param {Object} data
|
||||
* @param {Object} unfilteredOptions (optional)
|
||||
* @param {Object} [unfilteredOptions]
|
||||
* @return {Promise<Bookshelf['Model']>} Edited Model
|
||||
*/
|
||||
edit: async function edit(data, unfilteredOptions) {
|
||||
@ -170,7 +170,7 @@ module.exports = function (Bookshelf) {
|
||||
* ### Add
|
||||
* Naive add
|
||||
* @param {Object} data
|
||||
* @param {Object} unfilteredOptions (optional)
|
||||
* @param {Object} [unfilteredOptions]
|
||||
* @return {Promise<Bookshelf['Model']>} Newly Added Model
|
||||
*/
|
||||
add: function add(data, unfilteredOptions) {
|
||||
@ -195,7 +195,7 @@ module.exports = function (Bookshelf) {
|
||||
/**
|
||||
* ### Destroy
|
||||
* Naive destroy
|
||||
* @param {Object} unfilteredOptions (optional)
|
||||
* @param {Object} [unfilteredOptions]
|
||||
* @return {Promise<Bookshelf['Model']>} Empty Model
|
||||
*/
|
||||
destroy: async function destroy(unfilteredOptions) {
|
||||
|
Loading…
Reference in New Issue
Block a user