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