mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
fix: Correct variables used in errors in sign.js
I couldn't figure out how to get a name for the no_suitable_app error unfortunately, so that's just commented out. /puter/packages/backend/src/routers/sign.js 65:74 error 'subject' is not defined no-undef 114:59 error 'subject' is not defined no-undef
This commit is contained in:
parent
fa3b86fa7e
commit
fa7c6bee96
@ -62,7 +62,8 @@ module.exports = eggspress('/sign', {
|
||||
|
||||
app = await get_app({ uid: req.body.app_uid });
|
||||
if ( ! app ) {
|
||||
throw APIError.create('no_suitable_app', null, { entry_name: subject.entry.name });
|
||||
// FIXME: subject.entry.name isn't available here
|
||||
throw APIError.create('no_suitable_app', null); //, { entry_name: subject.entry.name });
|
||||
}
|
||||
// Generate user-app token
|
||||
const svc_auth = Context.get('services').get('auth');
|
||||
@ -111,7 +112,7 @@ module.exports = eggspress('/sign', {
|
||||
|
||||
const svc_acl = Context.get('services').get('acl');
|
||||
if ( ! await svc_acl.check(actor, node, 'see') ) {
|
||||
throw await svc_acl.get_safe_acl_error(actor, subject, 'see');
|
||||
throw await svc_acl.get_safe_acl_error(actor, node, 'see');
|
||||
}
|
||||
|
||||
if ( app !== null ) {
|
||||
|
Loading…
Reference in New Issue
Block a user