diff --git a/core/api.go b/core/api.go index ff10666..8e2950a 100644 --- a/core/api.go +++ b/core/api.go @@ -29,14 +29,14 @@ import ( ) type fileDocumentDesc struct { - Service string - Key string - Src string - Link string - Desc string - Extract bool - Timestamp int64 - Contents []byte `json:",omitempty"` + Service string `bson:"service" json:"service"` + Key string `bson:"key" json:"key"` + Src string `bson:"src" json:"src"` + Link string `bson:"link" json:"link"` + Desc string `bson:"desc" json:"desc"` + Extract bool `bson:"extract" json:"extract"` + Timestamp int64 `bson:"timestamp" json:"timestamp"` + Contents []byte `bson:"contents,omitempty" json:"contents,omitempty"` } func (fd *fileDocumentDesc) save() error {