added command "list" (so far without -status)
This commit is contained in:
+2
-2
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user