From 7b70091ad261afb46c143583fd74963334e27c9f Mon Sep 17 00:00:00 2001 From: dzdidi Date: Sun, 11 Feb 2024 16:59:27 +0000 Subject: [PATCH] rpc-acl: fix function calls Signed-off-by: dzdidi --- src/rpc-handlers/acl.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/rpc-handlers/acl.js b/src/rpc-handlers/acl.js index 6c43d02..704cf41 100644 --- a/src/rpc-handlers/acl.js +++ b/src/rpc-handlers/acl.js @@ -1,11 +1,11 @@ const ACL = require('../acl') -async getACLHandler (publicKey, req) { +async function getACLHandler (publicKey, req) { const { repoName, userId } = await this.parseACLRequest(publicKey, req) return Buffer.from(JSON.stringify(ACL.getACL(repoName))) } -async addACLHandler (publicKey, req) { +async function addACLHandler (publicKey, req) { const { repoName, userId, acl } = await this.parseACLRequest(publicKey, req) // TODO @@ -14,17 +14,16 @@ async addACLHandler (publicKey, req) { return Buffer.from('ACL updated') } -async delACLHandler (publicKey, req) { +async function delACLHandler (publicKey, req) { const { repoName, userId, acl } = await this.parseACLRequest(publicKey, req) } -async chgACLHandler (publicKey, req) { +async function chgACLHandler (publicKey, req) { const { repoName, userId, acl } = await this.parseACLRequest(publicKey, req) } - -async parseACLRequest(publicKey, req) { +async function parseACLRequest(publicKey, req) { if (!req) throw new Error('Request is empty') const request = JSON.parse(req.toString()) const userId = await this.authenticate(publicKey, request)