more elaborate todos on push capabilities

Signed-off-by: dzdidi <deniszalessky@gmail.com>
This commit is contained in:
dzdidi
2024-01-23 17:06:33 +00:00
parent 39eebdf629
commit 8dedb6bf17
3 changed files with 44 additions and 20 deletions

View File

@@ -16,9 +16,16 @@ module.exports = class RPC {
// for example check of peerInfo.publicKey is in a list of allowed keys
// which can in turn be stored in a .git-daemon-export-ok file
/* -- PULL HANDLERS -- */
rpc.respond('get-repos', req => this.getReposHandler(req))
rpc.respond('get-refs', async req => await this.getRefsHandler(req))
/* -- PUSH HANDLERS -- */
// TODO: reponders to pull requests
// normal push: git pull <url>
// force push: git reset --hard url/<branch>
// delete branch: git branch -D url/<branch>
this.connections[peerInfo.publicKey] = rpc
}