Skip to content

Commit 41f33d9

Browse files
committed
Fixed Canceled Status in JSON (Works correctly now)
1 parent 494c0a4 commit 41f33d9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

db/database.db

0 Bytes
Binary file not shown.

src/Database.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,13 @@ int Database::ordersCallback(void *data, int argc, char **argv, char **keyCol)
7777
orderID = argv[0],
7878
movieID = argv[1],
7979
locationID = argv[2],
80-
canceled = argv[3],
80+
canceledStatus = argv[3],
8181
key = argv[4];
82-
83-
Order order(orderID,movieID,locationID,canceled=="1"?"true":"false",key);
82+
83+
int isCanceled = canceledStatus.compare("1");
84+
bool canceled = isCanceled==0;
85+
86+
Order order(orderID,movieID,locationID,canceled,key);
8487

8588
cout << order.ToJson();
8689
if (++selectCounter != counter)

src/fcgi

-104 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)