Compare commits
4 Commits
adriangl-p
...
spaceapi
Author | SHA1 | Date | |
---|---|---|---|
9d8b14a08b
|
|||
0542a10d03
|
|||
c6df8e6ae3 | |||
aebc14ccb5 |
@@ -196,6 +196,9 @@ in
|
|||||||
include ${pkgs.nginx}/conf/fastcgi_params;
|
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME ${finalPackage}/share/php/pvv-nettsiden/www$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME ${finalPackage}/share/php/pvv-nettsiden/www$fastcgi_script_name;
|
||||||
fastcgi_pass unix:${config.services.phpfpm.pools."pvv-nettsiden".socket};
|
fastcgi_pass unix:${config.services.phpfpm.pools."pvv-nettsiden".socket};
|
||||||
|
location = /spaceapi.php {
|
||||||
|
add_header Content-Type application/json;
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# based on https://simplesamlphp.org/docs/stable/simplesamlphp-install.html#configuring-nginx
|
# based on https://simplesamlphp.org/docs/stable/simplesamlphp-install.html#configuring-nginx
|
||||||
|
@@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
require_once dirname(__DIR__) . implode(DIRECTORY_SEPARATOR, ['', 'inc', 'include.php']);
|
require_once dirname(__DIR__) . implode(DIRECTORY_SEPARATOR, ['', 'inc', 'include.php']);
|
||||||
|
|
||||||
header('Content-Type: application/json');
|
|
||||||
header('Access-Control-Allow-Origin: *');
|
|
||||||
|
|
||||||
$pdo = new \PDO($DB_DSN, $DB_USER, $DB_PASS);
|
$pdo = new \PDO($DB_DSN, $DB_USER, $DB_PASS);
|
||||||
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
@@ -23,8 +20,8 @@ $doorEntry = (object)($door->getCurrent());
|
|||||||
"ext_mazemap": "https://link.mazemap.com/2n2HWa7H",
|
"ext_mazemap": "https://link.mazemap.com/2n2HWa7H",
|
||||||
"address": "Sem Sælands vei 1, 7034 Trondheim, Norway",
|
"address": "Sem Sælands vei 1, 7034 Trondheim, Norway",
|
||||||
"timezone": "Europe/Oslo",
|
"timezone": "Europe/Oslo",
|
||||||
"lon": 10.4038103,
|
"lon": 10.242,
|
||||||
"lat": 63.417025
|
"lat": 63.250
|
||||||
},
|
},
|
||||||
"contact": {
|
"contact": {
|
||||||
"irc": "irc://irc.pvv.ntnu.no/pvv",
|
"irc": "irc://irc.pvv.ntnu.no/pvv",
|
||||||
@@ -42,7 +39,7 @@ $doorEntry = (object)($door->getCurrent());
|
|||||||
"feeds": {
|
"feeds": {
|
||||||
"wiki": {
|
"wiki": {
|
||||||
"type": "atom",
|
"type": "atom",
|
||||||
"url": "https://wiki.pvv.ntnu.no/w/api.php?hidebots=1&urlversion=1&action=feedrecentchanges&feedformat=atom"
|
"url": "https://www.pvv.ntnu.no/w/api.php?hidebots=1&urlversion=1&action=feedrecentchanges&feedformat=atom"
|
||||||
},
|
},
|
||||||
"calendar": {
|
"calendar": {
|
||||||
"type": "html",
|
"type": "html",
|
||||||
|
Reference in New Issue
Block a user