Comparing version 2.7.25 to 2.7.26-next.0
@@ -206,5 +206,5 @@ import { __decorate, __metadata } from "tslib"; | ||
if (this.options.admin !== undefined && this.options.admin !== false) { | ||
const admin = (is_entities_metadata) => this.process(async (remult, req, res, orig, origResponse) => { | ||
const admin = () => this.process(async (remult, req, res, orig, origResponse) => { | ||
if (remult.isAllowed(this.options.admin)) { | ||
if (is_entities_metadata) { | ||
if (orig.params.id === '__entities-metadata') { | ||
res.success(buildEntityInfo({ | ||
@@ -226,6 +226,5 @@ remult, | ||
}); | ||
r.route(this.options.rootPath + '/admin/__entities-metadata').get(admin(true)); | ||
r.route(this.options.rootPath + '/admin/:id').get(admin(false)); | ||
r.route(this.options.rootPath + '/admin/').get(admin(false)); | ||
r.route(this.options.rootPath + '/admin').get(admin(false)); | ||
r.route(this.options.rootPath + '/admin/:id').get(admin()); | ||
r.route(this.options.rootPath + '/admin/').get(admin()); | ||
r.route(this.options.rootPath + '/admin').get(admin()); | ||
} | ||
@@ -232,0 +231,0 @@ r.route(this.options.rootPath + '/me').get(this.process(async (remult, req, res) => res.success(remult.user ?? null))); |
{ | ||
"name": "remult", | ||
"version": "2.7.25", | ||
"version": "2.7.26-next.0", | ||
"description": "A CRUD framework for full-stack TypeScript", | ||
@@ -5,0 +5,0 @@ "homepage": "https://remult.dev", |
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4978191
55916
1