Skip to content

Commit

Permalink
Patch document status for database
Browse files Browse the repository at this point in the history
  • Loading branch information
jfreda committed Oct 24, 2023
1 parent 9428830 commit 2547609
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion internal/api/v2/documents.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,20 @@ Hermes
// Document modified time.
model.DocumentModifiedAt = time.Unix(doc.ModifiedTime, 0)

// Status.
if req.Status != nil {
switch *req.Status {
case "Approved":
model.Status = models.ApprovedDocumentStatus
case "In-Review":
model.Status = models.InReviewDocumentStatus
case "Obsolete":
model.Status = models.ObsoleteDocumentStatus
}
}

// Summary.
if req.Summary != nil {
// model.Summary = *req.Summary
model.Summary = req.Summary
}

Expand Down

0 comments on commit 2547609

Please sign in to comment.