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/* public/assets/scripts/*
!public/assets/scripts/dash.js !public/assets/scripts/dash.js
!public/assets/scripts/dash.js.map
!public/assets/images !public/assets/images
public/assets/images/* public/assets/images/*
!public/assets/images/global/ !public/assets/images/global/

View file

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

View file

@ -3,7 +3,7 @@
<img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/> <img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/>
</a> </a>
</div> </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_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_email" id="new_member_email" placeholder="email"/>
<input type="text" name="new_member_pass" id="new_member_pass" placeholder="password"/> <input type="text" name="new_member_pass" id="new_member_pass" placeholder="password"/>

View file

@ -7,7 +7,7 @@
"version": "1.0.0", "version": "1.0.0",
"description": "The most chill API for the most chill blog framework" "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", "main": "public/assets/scripts/dash.js",
"targets": { "targets": {
"main": { "main": {

View file

@ -405,7 +405,7 @@ const $7e781a188206b2b3$export$d46ee33f41c7e43d = "apiUseNotAuthorized";
* @property {string} new_member_title - title for new user * @property {string} new_member_title - title for new user
*/ create(data) { */ create(data) {
return new Promise((resolve, reject)=>{ 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); resolve(result);
}).catch((err)=>{ }).catch((err)=>{
reject(err); reject(err);
@ -426,7 +426,7 @@ const $7e781a188206b2b3$export$d46ee33f41c7e43d = "apiUseNotAuthorized";
method = $7e781a188206b2b3$export$1470a914435ca933; method = $7e781a188206b2b3$export$1470a914435ca933;
type = $7e781a188206b2b3$export$d1a86f208bdcebe5; type = $7e781a188206b2b3$export$d1a86f208bdcebe5;
data = new FormData(form); 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); resolve(result);
}).catch((err)=>{ }).catch((err)=>{
reject(err); reject(err);
@ -7318,17 +7318,17 @@ class $5ec7c34d3cbf8bc6$export$2e2bcd8739ae039 {
mm.create(setUpForm).then((response)=>{ mm.create(setUpForm).then((response)=>{
if (response.type === $995f55a4eccd256d$export$74a5c30fa9753d80) { if (response.type === $995f55a4eccd256d$export$74a5c30fa9753d80) {
self.processing = false; self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, false); e.target.innerHTML = response.message;
} else { } else {
self.processing = false; self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, true); e.target.innerHTML = response.message;
setTimeout(()=>{ setTimeout(()=>{
window.location = "/dashboard"; window.location = "/dashboard";
}, 700); }, 700);
} }
}).catch((err)=>{ }).catch((err)=>{
self.processing = false; self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(err, false); //notify.alert(err, false);
}); });
} }
handleRestore(e) { handleRestore(e) {
@ -7342,17 +7342,17 @@ class $5ec7c34d3cbf8bc6$export$2e2bcd8739ae039 {
mm.restore(form).then((response)=>{ mm.restore(form).then((response)=>{
if (response.type === $995f55a4eccd256d$export$f99ec790401d28da) { if (response.type === $995f55a4eccd256d$export$f99ec790401d28da) {
self.processing = false; self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, false); e.target.innerHTML = response.message;
} else { } else {
self.processing = false; self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(response.message, true); e.target.innerHTML = response.message;
setTimeout(()=>{ setTimeout(()=>{
window.location = "/dashboard"; window.location = "/dashboard";
}, 1500); }, 1500);
} }
}).catch((err)=>{ }).catch((err)=>{
self.processing = false; self.processing = false;
$5ec7c34d3cbf8bc6$var$notify.alert(err, false); e.target.innerHTML = err;
}); });
} }
handleReset(e) { 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 => { .then(response => {
if (response.type === DataEvent.API_INIT_LAME) { if (response.type === DataEvent.API_INIT_LAME) {
self.processing = false; self.processing = false;
notify.alert(response.message, false); e.target.innerHTML = response.message;
} else { } else {
self.processing = false; self.processing = false;
notify.alert(response.message, true); e.target.innerHTML = response.message;
setTimeout(() => { setTimeout(() => {
window.location = '/dashboard'; window.location = '/dashboard';
}, 700); }, 700);
@ -105,7 +105,7 @@ export default class Base {
}) })
.catch(err => { .catch(err => {
self.processing = false; self.processing = false;
notify.alert(err, false); //notify.alert(err, false);
}); });
} }
@ -121,10 +121,10 @@ export default class Base {
.then(response => { .then(response => {
if (response.type === DataEvent.REQUEST_LAME) { if (response.type === DataEvent.REQUEST_LAME) {
self.processing = false; self.processing = false;
notify.alert(response.message, false); e.target.innerHTML = response.message;
} else { } else {
self.processing = false; self.processing = false;
notify.alert(response.message, true); e.target.innerHTML = response.message;
setTimeout(() => { setTimeout(() => {
window.location = '/dashboard'; window.location = '/dashboard';
}, 1500); }, 1500);
@ -132,7 +132,7 @@ export default class Base {
}) })
.catch(err => { .catch(err => {
self.processing = false; self.processing = false;
notify.alert(err, false); e.target.innerHTML = err;
}); });
} }

View file

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