def delete(self, tid, eid): team = ReportTeam.get(tid) if session[USER_SESSION]["uid"] != team["create_uid"]: raise ExceptionEx("当前用户无法删除编辑人") ReportEditor.delete(eid) return self.succ()
def post(self, tid): submit = self.request() team = ReportTeam.get(tid) if session[USER_SESSION]["uid"] != team["create_uid"]: raise ExceptionEx("当前用户无法新建编辑人") submit["team_id"] = tid ReportEditor.add(submit) return self.succ()
def put(self, rid): submit = self.request() submit["id"] = rid ReportTeam.edit(submit) return self.succ()
def delete(self, rid): ReportTeam.delete(rid) return self.succ()
def post(self): submit = self.request() submit["create_uid"] = session[USER_SESSION]["uid"] ReportTeam.add(submit) return self.succ()
def get(self): return self.succ(ReportTeam.select())