keystone
Version:
Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose
15 lines (13 loc) • 356 B
JavaScript
/**
* Gets the Admin URL to view the list (or an item if provided)
*
* Example:
* var listURL = list.getAdminURL()
* var itemURL = list.getAdminURL(item)
*
* @param {Object} item
*/
function getAdminURL (item) {
return '/' + this.keystone.get('admin path') + '/' + this.path + (item ? '/' + item.id : '');
}
module.exports = getAdminURL;