Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Check = {
- type: function(item) {
- if (typeof item != "undefined") return true;
- return false;
- },
- json: function(item) {
- try { JSON.parse(item) }
- catch (e) { return false }
- return true;
- },
- user: function(id, data, callback) {
- Setting.update({'0': id}, data).exec(function afterwards(err,ok){
- if (err) return callback(true);
- Profile.findOne({id_profil: id}).exec(function findOneCB(err,profile){
- if (err) return callback(true);
- return callback(null, profile);
- });
- })
- },
- post: function(data, callback) {
- if (Check.type(data.tags) && (Check.type(data.like) || Check.type(data.follow) || Check.type(data.unfollow) || (Check.type(data.comment) && typeof Check.type(data.comments)))) {
- return 'жопв';
- }
- return 'хуй';
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement