fix bugs in profile architecture
This commit is contained in:
parent
6acb02aa7d
commit
9e8219b463
@ -622,7 +622,7 @@ function getProfileData() { // Gets all data related to profile.
|
|||||||
if(profile.description.includes("Say something about yourself!")) profile.description = "";
|
if(profile.description.includes("Say something about yourself!")) profile.description = "";
|
||||||
|
|
||||||
profile.school = document.getElementById("school").childNodes[0].nodeValue;
|
profile.school = document.getElementById("school").childNodes[0].nodeValue;
|
||||||
if(profile.school === "Click here to edit...") school = "";
|
if(profile.school === "Click here to edit...") profile.school = "";
|
||||||
|
|
||||||
var gradein = document.getElementById("grade").childNodes[0].nodeValue;
|
var gradein = document.getElementById("grade").childNodes[0].nodeValue;
|
||||||
profile.grade = parseInt(gradein.substring(gradein.length - 2, gradein));
|
profile.grade = parseInt(gradein.substring(gradein.length - 2, gradein));
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
Router.route('/', {
|
Router.route('/', {
|
||||||
waitOn: function() {
|
waitOn: function() {
|
||||||
if (!Meteor.userId() || !Meteor.user().profile.school) {
|
if (!Meteor.userId() || _.contains([null, undefined, ""], Meteor.user().profile.school)) {
|
||||||
this.redirect('/login');
|
this.redirect('/login');
|
||||||
} else {
|
} else {
|
||||||
return [
|
return [
|
||||||
|
|||||||
@ -508,7 +508,7 @@ Meteor.methods({
|
|||||||
current.banner = "/Banners/defaultcover.jpg";
|
current.banner = "/Banners/defaultcover.jpg";
|
||||||
current.classes = [userId];
|
current.classes = [userId];
|
||||||
current.preferences = {
|
current.preferences = {
|
||||||
"theme": "light",
|
"theme": themeColors.light,
|
||||||
"mode": "classes",
|
"mode": "classes",
|
||||||
"timeHide": 1,
|
"timeHide": 1,
|
||||||
"done": true,
|
"done": true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user