DevServer Fix

This commit is contained in:
srgooglo 2020-03-02 21:03:52 +01:00
parent 23c10d1ae7
commit 879d703d22
5 changed files with 48 additions and 34 deletions

View File

@ -1,22 +1,17 @@
module.exports = { module.exports = {
Endpoints: { Endpoints: {
action_post: "https://api.ragestudio.net/RS-YIBTP/yid/post-actions?access_token=", action_post: "https://api.ragestudio.net/RSA-COMTY/yid/post-actions?access_token=",
get_posts: "https://api.ragestudio.net/RS-YIBTP/yid/posts?access_token=", get_posts: "https://api.ragestudio.net/RSA-COMTY/yid/posts?access_token=",
find_user: "https://api.ragestudio.net/RS-YIBTP/yid/find_user?access_token=", find_user: "https://api.ragestudio.net/RSA-COMTY/yid/find_user?access_token=",
search_endpoint: "https://api.ragestudio.net/RS-YIBTP/yid/search?access_token=", search_endpoint: "https://api.ragestudio.net/RSA-COMTY/yid/search?access_token=",
get_sessions: "https://api.ragestudio.net/RS-YIBTP/yid/session_id?access_token=", get_sessions: "https://api.ragestudio.net/RSA-COMTY/yid/session_id?access_token=",
auth_endpoint: "https://api.ragestudio.net/RS-YIBTP/yid/auth", auth_endpoint: "https://api.ragestudio.net/RSA-COMTY/yid/auth",
new_post: "https://api.ragestudio.net/RS-YIBTP/yid/new_post?access_token=", new_post: "https://api.ragestudio.net/RSA-COMTY/yid/new_post?access_token=",
get_servicesHandler: 'https://api.ragestudio.net/RS-YIBTP/rs/servicesHandler', get_config_endpoint: "https://api.ragestudio.net/RSA-COMTY/yid/get-site-settings?access_token=",
get_modhandler: "https://api.ragestudio.net/RS-YIBTP/rs/modHandler", get_userData_endpoint: "https://api.ragestudio.net/RSA-COMTY/yid/get-user-data?access_token=",
get_subscriptionHandler: "https://api.ragestudio.net/RS-YIBTP/rs/subscriptionHandler", update_userData_endpoint: "https://api.ragestudio.net/RSA-COMTY/yid/update-user-data?access_token=",
get_marketplace_global: "https://api.ragestudio.net/RS-YIBTP/rs/marketplaceHandler?access_token=", removeToken: "https://api.ragestudio.net/RSA-COMTY/yid/delete-access-token?access_token=",
get_config_endpoint: "https://api.ragestudio.net/RS-YIBTP/yid/get-site-settings?access_token=", register_endpoint: "https://api.ragestudio.net/RSA-COMTY/yid/create-account",
get_userData_endpoint: "https://api.ragestudio.net/RS-YIBTP/yid/get-user-data?access_token=", resetPassword_endpoint: "https://api.ragestudio.net/RSA-COMTY/yid/send-reset-password-email?access_token=",
update_userData_endpoint: "https://api.ragestudio.net/RS-YIBTP/yid/update-user-data?access_token=",
removeToken: "https://api.ragestudio.net/RS-YIBTP/yid/delete-access-token?access_token=",
register_endpoint: "https://api.ragestudio.net/RS-YIBTP/yid/create-account",
resetPassword_endpoint: "https://api.ragestudio.net/RS-YIBTP/yid/send-reset-password-email?access_token=",
logotype_uri: 'https://api.ragestudio.net/branding/svg/STUDIO-JETBLACK-Generic_template.png',
} }
} }

View File

@ -2,7 +2,7 @@
"name": "comty-development", "name": "comty-development",
"title": "Comty™", "title": "Comty™",
"DevBuild": true, "DevBuild": true,
"version": "0.1.27", "version": "0.2.02",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"author": "RageStudio", "author": "RageStudio",
@ -63,6 +63,7 @@
"react-sound": "^1.2.0", "react-sound": "^1.2.0",
"react-transition-group": "^4.3.0", "react-transition-group": "^4.3.0",
"recompose": "^0.30.0", "recompose": "^0.30.0",
"sqlite": "^3.0.3",
"store": "^2.0.12", "store": "^2.0.12",
"ts-cookies": "^1.0.0", "ts-cookies": "^1.0.0",
"umi-plugin-datahub": "^4.1.0", "umi-plugin-datahub": "^4.1.0",

View File

@ -138,18 +138,23 @@ export function GetAuth(EncUsername, EncPassword, callback) {
}; };
jquery.ajax(settings) jquery.ajax(settings)
.done(function (response) { .done(function (response) {
console.log(prefix, 'Server response... Dispathing data to login API...'); console.log(prefix, 'Server response... Dispathing data to login API...', response);
var identState = JSON.parse(response)['api_status']; try {
if (identState == 200) { var identState = JSON.parse(response)['api_status'];
const UserID = JSON.parse(response)['user_id']; if (identState == 200) {
const UserToken = JSON.parse(response)['access_token']; const UserID = JSON.parse(response)['user_id'];
let FramePayload = { UserID, UserToken } const UserToken = JSON.parse(response)['access_token'];
ycore.DevOptions.ShowFunctionsLogs ? console.log(FramePayload) : null let FramePayload = { UserID, UserToken }
callback(null, '200') ycore.DevOptions.ShowFunctionsLogs ? console.log(FramePayload) : null
ycore.InitSDCP(FramePayload, (done) => done? __API__User(FramePayload) : null ) callback(null, '200')
} ycore.InitSDCP(FramePayload, (done) => done? __API__User(FramePayload) : null )
if (identState == 400) { }
callback(null, '400') if (identState == 400) {
callback(null, '400')
}
} catch (error) {
callback(true, '500')
ycore.notifyError('Server bad response')
} }
return; return;
}) })

View File

@ -66,6 +66,12 @@ class YulioID extends Component {
if (response == '400') { if (response == '400') {
this.setState({ StateIcon: 'exclamation-circle', StateMessage: 'Invalid credentials', StateException: true }) this.setState({ StateIcon: 'exclamation-circle', StateMessage: 'Invalid credentials', StateException: true })
} }
if (response == '404') {
this.setState({ StateIcon: 'exclamation-circle', StateMessage: 'Invalid Data', StateException: true })
}
if (response == '500') {
this.setState({ StateIcon: 'cluster', StateMessage: 'Server Error', StateException: true })
}
} }

View File

@ -33,9 +33,16 @@
margin: 13px; margin: 13px;
} }
.StateIcon_exception { .StateIcon_exception {
color: red; font-size: 24px;
font-size: 24px; margin: 13px;
margin: 13px; color: red !important;
:global{
i {
color: red !important;
}
}
} }
.mainlp { .mainlp {
flex-direction: column; flex-direction: column;