changing types

This commit is contained in:
Florian Hoss 2022-04-19 21:35:32 +02:00
parent 61966d6791
commit 1a2b495ff7
2 changed files with 5 additions and 5 deletions

View file

@ -252,14 +252,14 @@ void esp32Firewall::setup_routing()
this->firewall_api->setDefaultNode(not_found); this->firewall_api->setDefaultNode(not_found);
} }
void esp32Firewall::json_generic_response(HTTPResponse *response, String serialized, int response_code) void esp32Firewall::json_generic_response(HTTPResponse *response, String serialized, const uint16_t response_code)
{ {
response->setHeader("Content-Type", "application/json"); response->setHeader("Content-Type", "application/json");
response->setStatusCode(response_code); response->setStatusCode(response_code);
response->println(serialized); response->println(serialized);
} }
void esp32Firewall::json_message_response(HTTPResponse *response, String message, int response_code) void esp32Firewall::json_message_response(HTTPResponse *response, String message, const uint16_t response_code)
{ {
response->setHeader("Content-Type", "application/json"); response->setHeader("Content-Type", "application/json");
response->setStatusCode(response_code); response->setStatusCode(response_code);

View file

@ -35,7 +35,7 @@ class esp32Firewall
// EEPROM // EEPROM
void setup_eeprom(); void setup_eeprom();
void eeprom_write_firewall_rule(firewall_rule_t *rule); void eeprom_write_firewall_rule(firewall_rule_t *);
void eeprom_write_firewall_rules(); void eeprom_write_firewall_rules();
void eeprom_read_firewall_rule(uint8_t &, uint8_t &); void eeprom_read_firewall_rule(uint8_t &, uint8_t &);
void eeprom_read_firewall_rules(); void eeprom_read_firewall_rules();
@ -48,8 +48,8 @@ class esp32Firewall
// Firewall-API Actions // Firewall-API Actions
void setup_certificate(); void setup_certificate();
void setup_routing(); void setup_routing();
void json_generic_response(HTTPResponse *, String, int); void json_generic_response(HTTPResponse *, String, const uint16_t);
void json_message_response(HTTPResponse *, String, int); void json_message_response(HTTPResponse *, String, const uint16_t);
String construct_json_firewall_rule(firewall_rule_t *); String construct_json_firewall_rule(firewall_rule_t *);
String construct_json_firewall(); String construct_json_firewall();
void not_found_handler(HTTPRequest *, HTTPResponse *); void not_found_handler(HTTPRequest *, HTTPResponse *);