refactor(main): move file operation functions to new source (#2124)

This commit is contained in:
ReenigneArcher
2024-02-10 07:37:27 -05:00
committed by GitHub
parent 1c50bc502b
commit cd2153f340
11 changed files with 113 additions and 78 deletions

View File

@@ -21,9 +21,9 @@
#include "config.h"
#include "crypto.h"
#include "file_handler.h"
#include "httpcommon.h"
#include "logging.h"
#include "main.h"
#include "network.h"
#include "nvhttp.h"
#include "platform/common.h"
@@ -161,12 +161,12 @@ namespace http {
return -1;
}
if (write_file(pkey.c_str(), creds.pkey)) {
if (file_handler::write_file(pkey.c_str(), creds.pkey)) {
BOOST_LOG(error) << "Couldn't open ["sv << config::nvhttp.pkey << ']';
return -1;
}
if (write_file(cert.c_str(), creds.x509)) {
if (file_handler::write_file(cert.c_str(), creds.x509)) {
BOOST_LOG(error) << "Couldn't open ["sv << config::nvhttp.cert << ']';
return -1;
}