Skip to content

Commit

Permalink
emotegrid: Put the JSON hack into "absent code"
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Jul 24, 2023
1 parent 5fa0aa7 commit f711ddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/http/emotegrid.pike
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ continue array|Concurrent.Future fetch_global_emotes() {
}

continue mapping(string:mixed)|Concurrent.Future http_request(Protocols.HTTP.Server.Request req) {
if (req->variables->code == "json") built_emotes->json = Standards.JSON.decode(Stdio.read_file("emotegrid.json"));
mapping info = built_emotes[req->variables->code];
if (!req->variables->code) info = Standards.JSON.decode(Stdio.read_file("emotegrid.json"));
if (!info) return 0; //TODO: Better page
if (!global_emotes->template) {
//Ensure that we at least have the template. It's not going to change often,
Expand Down

0 comments on commit f711ddb

Please sign in to comment.