From 45ae60a874f13ca4960d469535b31c86e2b7d022 Mon Sep 17 00:00:00 2001 From: Mitja Zivkovic Date: Sun, 23 Dec 2018 18:18:06 +0100 Subject: [PATCH] Rename content to record on json --- crm/repository/record.go | 2 +- crm/types/types.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crm/repository/record.go b/crm/repository/record.go index 78fd9d078..8cb8692d2 100644 --- a/crm/repository/record.go +++ b/crm/repository/record.go @@ -39,7 +39,7 @@ type ( FindResponse struct { Meta FindResponseMeta `json:"meta"` - Records []*types.Record `json:"contents"` + Records []*types.Record `json:"records"` } record struct { diff --git a/crm/types/types.go b/crm/types/types.go index 83e3fd7c9..390e0825d 100644 --- a/crm/types/types.go +++ b/crm/types/types.go @@ -14,7 +14,7 @@ import ( type ( // Record is a stored row in the `record` table Record struct { - ID uint64 `json:"contentID,string" db:"id"` + ID uint64 `json:"recordID,string" db:"id"` ModuleID uint64 `json:"moduleID,string" db:"module_id"` User *systemTypes.User `json:"user,omitempty" db:"-"`