forked from lda/telodendria
Format code, remove dataDir from sample production.conf
This commit is contained in:
parent
0cca38115a
commit
ae38791df2
14 changed files with 53 additions and 25 deletions
|
@ -2,7 +2,6 @@
|
|||
"log": {
|
||||
"output": "file"
|
||||
},
|
||||
"dataDir": "/var/telodendria",
|
||||
"listen": [
|
||||
{
|
||||
"port": 8008,
|
||||
|
|
|
@ -292,7 +292,8 @@ start:
|
|||
Log(LOG_ERR, "Please restore from a backup.");
|
||||
exit = EXIT_FAILURE;
|
||||
goto finish;
|
||||
} else if (!tConfig->ok)
|
||||
}
|
||||
else if (!tConfig->ok)
|
||||
{
|
||||
Log(LOG_ERR, tConfig->err);
|
||||
exit = EXIT_FAILURE;
|
||||
|
|
|
@ -66,6 +66,7 @@ ROUTE_IMPL(RouteChangePwd, path, argp)
|
|||
char *newPassword;
|
||||
|
||||
Config *config = ConfigLock(db);
|
||||
|
||||
if (!config)
|
||||
{
|
||||
Log(LOG_ERR, "Password endpoint failed to lock configuration.");
|
||||
|
|
|
@ -58,6 +58,7 @@ ROUTE_IMPL(RouteLogin, path, argp)
|
|||
char *fullUsername;
|
||||
|
||||
Config *config = ConfigLock(db);
|
||||
|
||||
if (!config)
|
||||
{
|
||||
Log(LOG_ERR, "Login endpoint failed to lock configuration.");
|
||||
|
|
|
@ -78,6 +78,7 @@ ROUTE_IMPL(RouteRegister, path, argp)
|
|||
DbRef *sessionRef;
|
||||
|
||||
Config *config = ConfigLock(db);
|
||||
|
||||
if (!config)
|
||||
{
|
||||
Log(LOG_ERR, "Registration endpoint failed to lock configuration.");
|
||||
|
|
|
@ -49,6 +49,7 @@ ROUTE_IMPL(RouteUserProfile, path, argp)
|
|||
char *value = NULL;
|
||||
|
||||
Config *config = ConfigLock(db);
|
||||
|
||||
if (!config)
|
||||
{
|
||||
Log(LOG_ERR, "User profile endpoint failed to lock configuration.");
|
||||
|
|
|
@ -36,6 +36,7 @@ ROUTE_IMPL(RouteWellKnown, path, argp)
|
|||
HashMap *response;
|
||||
|
||||
Config *config = ConfigLock(args->matrixArgs->db);
|
||||
|
||||
if (!config)
|
||||
{
|
||||
Log(LOG_ERR, "Well-known endpoint failed to lock configuration.");
|
||||
|
|
|
@ -46,6 +46,7 @@ ROUTE_IMPL(RouteWhoami, path, argp)
|
|||
char *deviceID;
|
||||
|
||||
Config *config = ConfigLock(db);
|
||||
|
||||
if (!config)
|
||||
{
|
||||
Log(LOG_ERR, "Who am I endpoint failed to lock configuration.");
|
||||
|
|
|
@ -197,4 +197,3 @@ TelodendriaPrintHeader(void)
|
|||
"Documentation/Support: https://telodendria.io");
|
||||
Log(LOG_INFO, "");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,26 @@
|
|||
/*
|
||||
* Copyright (C) 2022-2023 Jordan Bancino <@jordan:bancino.net>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation files
|
||||
* (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#ifndef TELODENDRIA_MAIN_H
|
||||
#define TELODENDRIA_MAIN_H
|
||||
|
||||
|
|
Loading…
Reference in a new issue