added redirect and ability to save checkboxes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "crow.h"
|
||||
#include "utils.hpp"
|
||||
#include "database.hpp"
|
||||
|
||||
using namespace std;
|
||||
@@ -44,7 +45,7 @@ map<string, string> Database::getStrMap(const string& sql){
|
||||
while (sqlite3_step(stmt) == SQLITE_ROW) {
|
||||
string key = reinterpret_cast<const char*>(sqlite3_column_text(stmt, 0));
|
||||
string value = reinterpret_cast<const char*>(sqlite3_column_text(stmt, 1));
|
||||
map[key] = value;
|
||||
map[key] = utils::urlDecode(value);
|
||||
}
|
||||
|
||||
sqlite3_finalize(stmt);
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <string>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
||||
class Database {
|
||||
|
||||
public:
|
||||
@@ -22,7 +24,7 @@ public:
|
||||
|
||||
std::set<std::string> getStrSet(const std::string& sql);
|
||||
|
||||
std::map<std::string, std::string> Database::getStrMap(const std::string& sql);
|
||||
std::map<std::string, std::string> getStrMap(const std::string& sql);
|
||||
|
||||
private:
|
||||
sqlite3_stmt* prepareStmt(const std::string& sql);
|
||||
|
||||
Reference in New Issue
Block a user