Compare commits
2 Commits
7482c329ed
...
2eb80e0da9
Author | SHA1 | Date | |
---|---|---|---|
2eb80e0da9 | |||
dbcdce5296 |
@ -20,7 +20,8 @@ const config = new ConfigManager(__path + '/config.json', true, {
|
||||
database: 'hydrationhub'
|
||||
},
|
||||
devmode: false,
|
||||
devmode_fileupload: false
|
||||
devmode_fileupload: false,
|
||||
galleryApiKey: '',
|
||||
});//, log.core); // Disabled due to Cyclic dependencies with log handler (specifically-> devmode for loglevel)
|
||||
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import express, { Request, Response } from 'express';
|
||||
import config from '../../handlers/config.js';
|
||||
|
||||
function get(req: Request, res: Response) {
|
||||
res.render("screensaver")
|
||||
res.render("screensaver", { apikey: config.global.galleryApiKey })
|
||||
}
|
||||
|
||||
export default { get };
|
||||
|
@ -26,10 +26,11 @@ function handleImage() {
|
||||
orientation: 'landscape',
|
||||
height: window.screen.availHeight,
|
||||
width: window.screen.availWidth,
|
||||
cropCenteringMode: 'sm'
|
||||
cropCenteringMode: 'sm',
|
||||
apikey: apiKey
|
||||
};
|
||||
|
||||
const apiUrl = `https://staging.thegreydiamond.de/projects/photoPortfolio/api/getRand.php?${new URLSearchParams(apiParams).toString()}`;
|
||||
const apiUrl = `https://photo.thegreydiamond.de/api/images/random.php?${new URLSearchParams(apiParams).toString()}`;
|
||||
|
||||
fetch(apiUrl)
|
||||
.then((response) => response.json())
|
||||
|
@ -10,6 +10,9 @@
|
||||
<div id="date"></div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const apiKey = "<%= it.apikey %>";
|
||||
</script>
|
||||
<script src="/static/apiWrapper.js"></script>
|
||||
<script src="/static/pageDriver.js"></script>
|
||||
<script src="/static/js/lockscreenBgHandler.js"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user