implement errors onto client
This commit is contained in:
parent
fcdbca066c
commit
4a6b765086
@ -4,6 +4,7 @@
|
||||
</head>
|
||||
|
||||
<template name="main">
|
||||
{{> sAlert}}
|
||||
<div class="noScroll">
|
||||
<img id="bg" src={{bgSrc}} style="min-width:{{screen}}">
|
||||
<div id="divLeftBar">
|
||||
|
||||
@ -972,6 +972,12 @@ function sendData(funcName) { // Call Meteor function, and do actions after func
|
||||
} else {
|
||||
Session.set("currentWork",null);
|
||||
}
|
||||
if (error !== undefined) {
|
||||
sAlert.error(error.error[1] || error.message, {
|
||||
effect: 'stackslide',
|
||||
position: 'top'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -218,7 +218,7 @@ function securityCheck(checklist, input) {
|
||||
break;
|
||||
// Comment too long
|
||||
case 15:
|
||||
if (typeof input.comment !== "string" || input.comment > 200) error = 13;
|
||||
if (typeof input.comment !== "string" || input.comment.length > 200) error = 13;
|
||||
break;
|
||||
// Private class
|
||||
case 16:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user