FullStack:

- Fix Issue API Problems
 - Bump both backend & frontend version.

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-02-08 13:25:49 +00:00
parent c218b82924
commit eac4016422
5 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,6 @@
const version = {
api: ["/api/v1/",],
app: "0.0.1"
app: "0.0.2"
};
module.exports = version;

View File

@ -1,6 +1,8 @@
const axios = require('axios')
const log = require('../utils/log.utils')
async function processor(data) {
log.out(`issueService.processor: Issue received`)
let out = {}
out.title = data.subject.replace(/<[^>]+>|[\*\$]/g, '');
out.body = data.msg.replace(/<[^>]+>|[\*\$]/g, '')
@ -18,8 +20,10 @@ async function sendToGitea(body) {
var res = await axios.post(url, body, opts)
// Need to read the output from the POST and pass the result upwards to the client.
if (res.status == 201) {
log.out("issueService.sendToGitea: Issue sent to Gitea")
return {status: res.status,message:"issue created"}
} else {
log.out("issueService.sendToGitea: Failed to send issue to Gitea")
return {status: res.status,message:"issue not created"}
}
}

View File

@ -64,7 +64,7 @@
</div>
<!-- Footer -->
<footer>
<p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - 0.0.2</p>
<p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - 0.0.3</p>
</footer>
</body>
</html>

View File

@ -72,7 +72,7 @@ async function send() {
redirect: 'follow',
body: payload
}
var res = await fetch("/api/v1/issue", opt)
var res = await fetch(`${window.location.origin}/api/v1/issue`, opt)
if (res.status == 200) {
setLoadingDesc("Success")
vibe("ok")

View File

@ -1,6 +1,6 @@
/* Service Worker */
const appVersion = "0.0.2"
const appVersion = "0.0.3"
const cacheName = `owlboard-${appVersion}`
const cacheIDs = [cacheName]
const cacheFiles = [