@@ -25,7 +25,10 @@ Template.postSubmit.events({
alert("This link has already been posted");
}
- Router.go('postPage', { _id: result._id });
+ // Router.go('postPage', { _id: result._id });
});
+
+ // Return to list page without waiting for the insert.
+ Router.go('postsList');
@@ -21,6 +21,14 @@ Meteor.methods({
url: String
+ if (Meteor.isServer) {
+ postAttributes.title += " (server)";
+ Meteor._sleepForMs(5000);
+ }
+ else {
+ postAttributes.title += " (client)";
var postWithSameLink = Posts.findOne({ url: postAttributes.url });
if (postWithSameLink) {
// Return to skip the insert.