From 6b4a7a64eedc3f4feb4a8be0177de059c99507d3 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 30 Nov 2023 22:17:39 +0100 Subject: repository: delete command Allow to delete a repository with: $ ogcli delete repo --id 10 --- cli/objects/repo.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cli/objects') diff --git a/cli/objects/repo.py b/cli/objects/repo.py index 9728f33..9f37591 100644 --- a/cli/objects/repo.py +++ b/cli/objects/repo.py @@ -41,6 +41,17 @@ class OgRepo(): rest.post('/repository/add', payload=payload) + @staticmethod + def delete_repo(rest, args): + parser = argparse.ArgumentParser(prog='ogcli delete repo') + parser.add_argument('--id', + nargs='?', + required=True, + help='room id in scopes') + parsed_args = parser.parse_args(args) + payload = {'id': parsed_args.id} + rest.post('/repository/delete', payload=payload) + @staticmethod def set_repo(rest, args): parser = argparse.ArgumentParser(prog='ogcli set repo') -- cgit v1.2.3-18-g5258