mirror of
https://github.com/strapi/strapi.git
synced 2025-07-14 04:21:56 +00:00
25 lines
291 B
JavaScript
25 lines
291 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Module dependencies
|
|
*/
|
|
|
|
// Public node modules.
|
|
const _ = require('lodash');
|
|
|
|
/**
|
|
* JSON API utils for BookShelf
|
|
*/
|
|
|
|
module.exports = {
|
|
|
|
/**
|
|
* Find primary key
|
|
*/
|
|
|
|
getPK: function (type) {
|
|
return global[_.capitalize(type)].idAttribute || 'id';
|
|
}
|
|
|
|
};
|