FullStack:
- Fix Issue API Problems - Bump both backend & frontend version. Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
c218b82924
commit
eac4016422
@ -1,6 +1,6 @@
|
|||||||
const version = {
|
const version = {
|
||||||
api: ["/api/v1/",],
|
api: ["/api/v1/",],
|
||||||
app: "0.0.1"
|
app: "0.0.2"
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = version;
|
module.exports = version;
|
@ -1,6 +1,8 @@
|
|||||||
const axios = require('axios')
|
const axios = require('axios')
|
||||||
|
const log = require('../utils/log.utils')
|
||||||
|
|
||||||
async function processor(data) {
|
async function processor(data) {
|
||||||
|
log.out(`issueService.processor: Issue received`)
|
||||||
let out = {}
|
let out = {}
|
||||||
out.title = data.subject.replace(/<[^>]+>|[\*\$]/g, '');
|
out.title = data.subject.replace(/<[^>]+>|[\*\$]/g, '');
|
||||||
out.body = data.msg.replace(/<[^>]+>|[\*\$]/g, '')
|
out.body = data.msg.replace(/<[^>]+>|[\*\$]/g, '')
|
||||||
@ -18,8 +20,10 @@ async function sendToGitea(body) {
|
|||||||
var res = await axios.post(url, body, opts)
|
var res = await axios.post(url, body, opts)
|
||||||
// Need to read the output from the POST and pass the result upwards to the client.
|
// Need to read the output from the POST and pass the result upwards to the client.
|
||||||
if (res.status == 201) {
|
if (res.status == 201) {
|
||||||
|
log.out("issueService.sendToGitea: Issue sent to Gitea")
|
||||||
return {status: res.status,message:"issue created"}
|
return {status: res.status,message:"issue created"}
|
||||||
} else {
|
} else {
|
||||||
|
log.out("issueService.sendToGitea: Failed to send issue to Gitea")
|
||||||
return {status: res.status,message:"issue not created"}
|
return {status: res.status,message:"issue not created"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<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>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -72,7 +72,7 @@ async function send() {
|
|||||||
redirect: 'follow',
|
redirect: 'follow',
|
||||||
body: payload
|
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) {
|
if (res.status == 200) {
|
||||||
setLoadingDesc("Success")
|
setLoadingDesc("Success")
|
||||||
vibe("ok")
|
vibe("ok")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* Service Worker */
|
/* Service Worker */
|
||||||
|
|
||||||
const appVersion = "0.0.2"
|
const appVersion = "0.0.3"
|
||||||
const cacheName = `owlboard-${appVersion}`
|
const cacheName = `owlboard-${appVersion}`
|
||||||
const cacheIDs = [cacheName]
|
const cacheIDs = [cacheName]
|
||||||
const cacheFiles = [
|
const cacheFiles = [
|
||||||
|
Reference in New Issue
Block a user