Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Failing after 2s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Failing after 2s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Failing after 2s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make-Without-sqlite3 (push) Failing after 1s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake-Without-sqlite3 (push) Failing after 2s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson-Without-sqlite3 (push) Failing after 2s
24 lines
504 B
C
24 lines
504 B
C
#include "api/user.h"
|
|
#include "config/config.h"
|
|
#include "file_db/filedb.h"
|
|
|
|
#ifdef USE_SQLITE3
|
|
#include "sqlite_db/sqlite.h"
|
|
#endif
|
|
|
|
char *db_get_all_users() {
|
|
#ifdef USE_SQLITE3
|
|
char *dbtype = cm_get_parameter_as_string(config, "database_type");
|
|
if (!strcmp(dbtype, "sqlite")) {
|
|
free(dbtype);
|
|
return sqlite_get_all_users();
|
|
} else if (!strcmp(dbtype, "file")) {
|
|
free(dbtype);
|
|
#endif
|
|
return filedb_get_all_users();
|
|
#ifdef USE_SQLITE3
|
|
}
|
|
return filedb_get_all_users();
|
|
#endif
|
|
}
|