Site Creation Hot Fix

There was an error in the request to set up a fresh site on the front
end and handling the respective object on the backend that was causing
the process to error out.

Also added the source map for the dash script because it's eventually
going to be fully transparent anyway.
This commit is contained in:
Ro 2023-04-06 17:59:31 -07:00
parent e7cd52bd12
commit f1850ce7f7
No known key found for this signature in database
GPG key ID: 29B551CDBD4D3B50
8 changed files with 22 additions and 19 deletions

1
.gitignore vendored
View file

@ -16,6 +16,7 @@ public/assets/css/*
!public/assets/scripts
public/assets/scripts/*
!public/assets/scripts/dash.js
!public/assets/scripts/dash.js.map
!public/assets/images
public/assets/images/*
!public/assets/images/global/

View file

@ -57,8 +57,8 @@ class SetUp
'id' => 1,
'uuid' => StringTools::createUUID(),
'title' => 'FIRST!',
'feature' => '/assets/images/global/default-bg.jpg',
'files' => '',
'imageList' => '/assets/images/global/default-bg.jpg',
'fileList' => '',
'path' => 'content/pages/start',
'layout' => 'index',
'tags' => 'start, welcome',

View file

@ -3,7 +3,7 @@
<img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/>
</a>
</div>
<form id="init-form" method="POST">
<form id="init-form" method="POST" onsubmit="return false;">
<input type="text" name="new_member_handle" id="new_member_handle" placeholder="handle"/>
<input type="text" name="new_member_email" id="new_member_email" placeholder="email"/>
<input type="text" name="new_member_pass" id="new_member_pass" placeholder="password"/>

View file

@ -7,7 +7,7 @@
"version": "1.0.0",
"description": "The most chill API for the most chill blog framework"
},
"source": "src/com/start.js",
"source": "src/com/Start.js",
"main": "public/assets/scripts/dash.js",
"targets": {
"main": {

View file

@ -405,7 +405,7 @@ const $7e781a188206b2b3$export$d46ee33f41c7e43d = "apiUseNotAuthorized";
* @property {string} new_member_title - title for new user
*/ create(data) {
return new Promise((resolve, reject)=>{
this._request($7e781a188206b2b3$export$6010ab8005eea11c, $7e781a188206b2b3$export$2fb4d35b5b0eebb2, $7e781a188206b2b3$export$1470a914435ca933, $7e781a188206b2b3$export$e133232680a85c80, data).then((result)=>{
this._request($7e781a188206b2b3$export$6010ab8005eea11c, null, $7e781a188206b2b3$export$2fb4d35b5b0eebb2, $7e781a188206b2b3$export$1470a914435ca933, $7e781a188206b2b3$export$e133232680a85c80, data).then((result)=>{
resolve(result);
}).catch((err)=>{
reject(err);
@ -426,7 +426,7 @@ const $7e781a188206b2b3$export$d46ee33f41c7e43d = "apiUseNotAuthorized";
method = $7e781a188206b2b3$export$1470a914435ca933;
type = $7e781a188206b2b3$export$d1a86f208bdcebe5;
data = new FormData(form);
this._request(url, event, method, type, data).then((result)=>{
this._request(url, null, event, method, type, data).then((result)=>{
resolve(result);
}).catch((err)=>{
reject(err);
@ -7318,17 +7318,17 @@ class $5ec7c34d3cbf8bc6$export$2e2bcd8739ae039 {
mm.create(setUpForm).then((response)=>{
if (response.type === $995f55a4eccd256d$export$74a5c30fa9753d80) {
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, false);
e.target.innerHTML = response.message;
} else {
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, true);
e.target.innerHTML = response.message;
setTimeout(()=>{
window.location = "/dashboard";
}, 700);
}
}).catch((err)=>{
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(err, false);
//notify.alert(err, false);
});
}
handleRestore(e) {
@ -7342,17 +7342,17 @@ class $5ec7c34d3cbf8bc6$export$2e2bcd8739ae039 {
mm.restore(form).then((response)=>{
if (response.type === $995f55a4eccd256d$export$f99ec790401d28da) {
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, false);
e.target.innerHTML = response.message;
} else {
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, true);
e.target.innerHTML = response.message;
setTimeout(()=>{
window.location = "/dashboard";
}, 1500);
}
}).catch((err)=>{
self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(err, false);
e.target.innerHTML = err;
});
}
handleReset(e) {

File diff suppressed because one or more lines are too long

View file

@ -94,10 +94,10 @@ export default class Base {
.then(response => {
if (response.type === DataEvent.API_INIT_LAME) {
self.processing = false;
notify.alert(response.message, false);
e.target.innerHTML = response.message;
} else {
self.processing = false;
notify.alert(response.message, true);
e.target.innerHTML = response.message;
setTimeout(() => {
window.location = '/dashboard';
}, 700);
@ -105,7 +105,7 @@ export default class Base {
})
.catch(err => {
self.processing = false;
notify.alert(err, false);
//notify.alert(err, false);
});
}
@ -121,10 +121,10 @@ export default class Base {
.then(response => {
if (response.type === DataEvent.REQUEST_LAME) {
self.processing = false;
notify.alert(response.message, false);
e.target.innerHTML = response.message;
} else {
self.processing = false;
notify.alert(response.message, true);
e.target.innerHTML = response.message;
setTimeout(() => {
window.location = '/dashboard';
}, 1500);
@ -132,7 +132,7 @@ export default class Base {
})
.catch(err => {
self.processing = false;
notify.alert(err, false);
e.target.innerHTML = err;
});
}

View file

@ -84,6 +84,7 @@ class MaintenanceManager {
return new Promise((resolve, reject) => {
this._request(
API_INIT,
null,
TASK_SITE_INIT,
REQUEST_TYPE_POST,
CONTENT_TYPE_JSON,
@ -113,7 +114,7 @@ class MaintenanceManager {
method = REQUEST_TYPE_POST;
type = CONTENT_TYPE_FORM;
data = new FormData(form);
this._request(url, event, method, type, data)
this._request(url, null, event, method, type, data)
.then(result => {
resolve(result);
})