diff --git a/lib/hero/db/helpers_tags.v b/lib/hero/db/helpers_tags.v index e2607d4a..26c90f9d 100644 --- a/lib/hero/db/helpers_tags.v +++ b/lib/hero/db/helpers_tags.v @@ -9,7 +9,6 @@ pub fn (mut self DB) tags_get(tags []string) !u32 { hash := md5.hexhash(tags_fixed.join(',')) tags_found := self.redis.hget('db:tags', hash)! return if tags_found == '' { - println('tags_get: new tags: ${tags_fixed.join(',')}') id := self.new_id()! self.redis.hset('db:tags', hash, id.str())! self.redis.hset('db:tags', id.str(), tags_fixed.join(','))! diff --git a/lib/hero/heromodels/calendar.v b/lib/hero/heromodels/calendar.v index 033a28ff..8ceae96a 100644 --- a/lib/hero/heromodels/calendar.v +++ b/lib/hero/heromodels/calendar.v @@ -155,7 +155,8 @@ pub fn calendar_handle(mut f ModelsFactory, rpcid int, servercontext map[string] return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[Calendar](params)! + args := db.decode_generic[CalendarArg](params)! + mut o := f.calendar.new(args)! o = f.calendar.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/calendar_event.v b/lib/hero/heromodels/calendar_event.v index a55a996c..82526971 100644 --- a/lib/hero/heromodels/calendar_event.v +++ b/lib/hero/heromodels/calendar_event.v @@ -462,7 +462,8 @@ pub fn calendar_event_handle(mut f ModelsFactory, rpcid int, servercontext map[s return new_response(rpcid, json.encode_pretty(res)) } 'set' { - mut o := db.decode_generic[CalendarEvent](params)! + args := db.decode_generic[CalendarEventArg](params)! + mut o := f.calendar_event.new(args)! o = f.calendar_event.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/chat_group.v b/lib/hero/heromodels/chat_group.v index 6de82136..6a72e9ae 100644 --- a/lib/hero/heromodels/chat_group.v +++ b/lib/hero/heromodels/chat_group.v @@ -175,7 +175,8 @@ pub fn chat_group_handle(mut f ModelsFactory, rpcid int, servercontext map[strin return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[ChatGroup](params)! + args := db.decode_generic[ChatGroupArg](params)! + mut o := f.chat_group.new(args)! o = f.chat_group.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/chat_message.v b/lib/hero/heromodels/chat_message.v index e1e1d91f..755e4775 100644 --- a/lib/hero/heromodels/chat_message.v +++ b/lib/hero/heromodels/chat_message.v @@ -298,7 +298,8 @@ pub fn chat_message_handle(mut f ModelsFactory, rpcid int, servercontext map[str return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[ChatMessage](params)! + args := db.decode_generic[ChatMessageArg](params)! + mut o := f.chat_message.new(args)! o = f.chat_message.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/contact.v b/lib/hero/heromodels/contact.v index c7d2dd44..d028a1e1 100644 --- a/lib/hero/heromodels/contact.v +++ b/lib/hero/heromodels/contact.v @@ -208,7 +208,8 @@ pub fn contact_handle(mut f ModelsFactory, rpcid int, servercontext map[string]s return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[Contact](params)! + args := db.decode_generic[ContactArg](params)! + mut o := f.contact.new(args)! o = f.contact.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/group.v b/lib/hero/heromodels/group.v index d20b1097..c43c9348 100644 --- a/lib/hero/heromodels/group.v +++ b/lib/hero/heromodels/group.v @@ -264,7 +264,8 @@ pub fn group_handle(mut f ModelsFactory, rpcid int, servercontext map[string]str return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[Group](params)! + args := db.decode_generic[GroupArg](params)! + mut o := f.group.new(args)! o = f.group.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/message.v b/lib/hero/heromodels/message.v index a4b81c6f..ab3deee3 100644 --- a/lib/hero/heromodels/message.v +++ b/lib/hero/heromodels/message.v @@ -237,7 +237,8 @@ pub fn message_handle(mut f ModelsFactory, rpcid int, servercontext map[string]s return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[Message](params)! + args := db.decode_generic[MessageArg](params)! + mut o := f.messages.new(args)! o = f.messages.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/planning.v b/lib/hero/heromodels/planning.v index 0d8b64a4..eef2adfe 100644 --- a/lib/hero/heromodels/planning.v +++ b/lib/hero/heromodels/planning.v @@ -297,7 +297,8 @@ pub fn planning_handle(mut f ModelsFactory, rpcid int, servercontext map[string] return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[Planning](params)! + args := db.decode_generic[PlanningArg](params)! + mut o := f.planning.new(args)! o = f.planning.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/profile.v b/lib/hero/heromodels/profile.v index 34e2202e..521f45a0 100644 --- a/lib/hero/heromodels/profile.v +++ b/lib/hero/heromodels/profile.v @@ -229,7 +229,8 @@ pub fn profile_handle(mut f ModelsFactory, rpcid int, servercontext map[string]s return new_response(rpcid, json.encode_pretty(res)) } 'set' { - mut o := db.decode_generic[Profile](params)! + args := db.decode_generic[ProfileArg](params)! + mut o := f.profile.new(args)! o = f.profile.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/project.v b/lib/hero/heromodels/project.v index 16c81df6..74fd6464 100644 --- a/lib/hero/heromodels/project.v +++ b/lib/hero/heromodels/project.v @@ -285,7 +285,8 @@ pub fn project_handle(mut f ModelsFactory, rpcid int, servercontext map[string]s return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[Project](params)! + args := db.decode_generic[ProjectArg](params)! + mut o := f.project.new(args)! o = f.project.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/project_issue.v b/lib/hero/heromodels/project_issue.v index 6e2f9c7f..f4ae7243 100644 --- a/lib/hero/heromodels/project_issue.v +++ b/lib/hero/heromodels/project_issue.v @@ -329,7 +329,8 @@ pub fn project_issue_handle(mut f ModelsFactory, rpcid int, servercontext map[st return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[ProjectIssue](params)! + args := db.decode_generic[ProjectIssueArg](params)! + mut o := f.project_issue.new(args)! o = f.project_issue.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/registration_desk.v b/lib/hero/heromodels/registration_desk.v index 39c97dc9..7cd1c5dd 100644 --- a/lib/hero/heromodels/registration_desk.v +++ b/lib/hero/heromodels/registration_desk.v @@ -303,7 +303,8 @@ pub fn registration_desk_handle(mut f ModelsFactory, rpcid int, servercontext ma return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[RegistrationDesk](params)! + args := db.decode_generic[RegistrationDeskArg](params)! + mut o := f.registration_desk.new(args)! o = f.registration_desk.set(o)! return new_response_int(rpcid, int(o.id)) } diff --git a/lib/hero/heromodels/user.v b/lib/hero/heromodels/user.v index ee98a17a..6148cad5 100644 --- a/lib/hero/heromodels/user.v +++ b/lib/hero/heromodels/user.v @@ -191,7 +191,8 @@ pub fn user_handle(mut f ModelsFactory, rpcid int, servercontext map[string]stri return new_response(rpcid, json.encode(res)) } 'set' { - mut o := db.decode_generic[User](params)! + args := db.decode_generic[UserArg](params)! + mut o := f.user.new(args)! o = f.user.set(o)! return new_response_int(rpcid, int(o.id)) }