Implement GET on a single communication object
This commit is contained in:
parent
8e0ac790f1
commit
fa27f79911
2 changed files with 41 additions and 24 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
querypublic "github.com/Gleipnir-Technology/nidus-sync/db/query/public"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/lint"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/platform/event"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func CommunicationsForOrganization(ctx context.Context, org_id int64) ([]model.Communication, error) {
|
||||
|
|
@ -63,6 +64,7 @@ func communicationMark(ctx context.Context, user User, comm_id int32, status mod
|
|||
if err := txn.Commit(ctx); err != nil {
|
||||
return fmt.Errorf("commit: %w", err)
|
||||
}
|
||||
log.Info().Int32("communication", comm_id).Str("status", status.String()).Msg("Marked communication")
|
||||
|
||||
event.Updated(event.TypeCommunication, user.Organization.ID, strconv.Itoa(int(comm_id)))
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue