added command "list" (so far without -status)

This commit is contained in:
odweta
2026-08-16 18:02:16 +02:00
parent c29d8f0d99
commit 45e0353a6d
4 changed files with 37 additions and 5 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ using namespace std;
void show_usage() {
cout << "usage:\n"
"these env vars have to be set: FRONTEND_API_KEY, DB_URL"
"these env vars have to be set: FRONTEND_API_KEY, BASE_API_URL\n"
"tickets create <title> <description>\n"
"tickets list [-status <status>]\n"
"tickets detail <id>" << endl;
@@ -33,7 +33,7 @@ int parse_args(Dao *dao, int argc, char *argv[]) {
if (strcmp(argv[1], "list") == 0) { // listing tickets (optional filter by status)
if (argc != 2 || argc != 4) {
if (argc != 2 && argc != 4) {
show_usage_and_die();
}