pyc-website
main website for pyc inc.
git clone https://9o.is/git/pyc-website.git
commit dfb3d51f557a496813fba9e094eb211ca08a1b66 parent 80556d769e44c259e80083a7405fdb0a2644535c Author: Jul <jul@9o.is> Date: Sun, 4 May 2014 06:39:51 -0400 snips don't fail when given records with existing indices. replaced unlikely, tampered returns with JNull Diffstat:
| M | src/main/scala/inc/pyc/snippet/AtmSnip.scala | | | 6 | +++--- |
| M | src/main/scala/inc/pyc/snippet/UserSnip.scala | | | 12 | ++---------- |
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/src/main/scala/inc/pyc/snippet/AtmSnip.scala b/src/main/scala/inc/pyc/snippet/AtmSnip.scala @@ -28,7 +28,7 @@ class AtmApplication extends AngularSnippet { rec.validate match { case Nil => - rec.save() + rec.save(false) NgAlert.success( <i class="fa-fw fa fa-thumbs-o-up"></i> ++ <strong>{ s"Your Bitcoin ATM application for ${rec.name.get} has been received." }</strong> ++ @@ -54,7 +54,7 @@ class FindAtm extends AngularSnippet { rec.validate match { case Nil => - rec.save + rec.save() NgAlert.success case errors => NgAlert.danger( @@ -80,7 +80,7 @@ class NearAtmNotify extends AngularSnippet { rec.validate match { case Nil => - rec.save() + rec.save(false) NgAlert.success( <i class="fa-fw fa fa-thumbs-o-up"></i> ++ <strong>{ s"Hi ${rec.fname.get}, your notification has been received." }</strong> ++ diff --git a/src/main/scala/inc/pyc/snippet/UserSnip.scala b/src/main/scala/inc/pyc/snippet/UserSnip.scala @@ -42,11 +42,7 @@ class UserLogin extends AngularSnippet { <p>Assure your email and password are correct.</p>, Nil) } } - }).headOption.getOrElse { - NgAlert.danger( - <i class="fa-fw fa fa-thumbs-o-down"></i> ++ - <strong>{"Your login information could not be processed."}</strong>, Nil) - } + }).headOption.getOrElse(JNull) } } @@ -109,11 +105,7 @@ class PasswordRecovery extends AngularSnippet { <i class="fa-fw fa fa-thumbs-o-down"></i> ++ <strong>Your email could not be found.</strong>, Nil) } - }).headOption.getOrElse { - NgAlert.danger( - <i class="fa-fw fa fa-thumbs-o-down"></i> ++ - <strong>The information submitted could not be processed.</strong>, Nil) - } + }).headOption.getOrElse(JNull) } }