Example #1
0
def removeuserComment(userid, pic_id,comment_id):
    from models import removeComment,getPicComments
    if (userid>0 and pic_id>0):
        try:
            result=removeComment(userid, pic_id,comment_id)
            if result is True:
                newCommentlist=getPicComments(pic_id)
                return newCommentlist
            else:
                return None
        except:
            print (exc_info())
            return None
Example #2
0
def adduserComment(userid, pic_id, comment):
    from models import addcomment,getPicComments
    newCommentList=list()
    if (userid > 0 and pic_id > 0 and comment != ''):
        try:
            result=addcomment(comment, userid, pic_id)
            if result is not None:
                newCommentList=getPicComments(pic_id)
                return newCommentList
            else:
                return None
        except:
            print (exc_info())
            return None