@mongoosejs/studio 0.0.91 → 0.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,17 @@
1
1
  'use strict';
2
2
 
3
+ const Archetype = require('archetype');
3
4
  const authorize = require('../../authorize');
4
5
 
5
- module.exports = ({ db }) => async function getDashboards(roles) {
6
+ const GetDashboardParams = new Archetype({
7
+ roles: {
8
+ $type: ['string']
9
+ }
10
+ }).compile('GetDashboardParams');
11
+
12
+ module.exports = ({ db }) => async function getDashboards(params) {
6
13
  const Dashboard = db.model('__Studio_Dashboard');
14
+ const { roles } = new GetDashboardParams(params);
7
15
 
8
16
  await authorize('Dashboard.getDashboards', roles);
9
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongoosejs/studio",
3
- "version": "0.0.91",
3
+ "version": "0.0.92",
4
4
  "description": "A sleek, powerful MongoDB UI with built-in dashboarding and auth, seamlessly integrated with your Express, Vercel, or Netlify app.",
5
5
  "homepage": "https://studio.mongoosejs.io/",
6
6
  "repository": {