Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Create and use repo.APITime to guarantee timestamp formatting in API #1595

Merged
merged 5 commits into from
May 28, 2019

Conversation

placer14
Copy link
Member

@placer14 placer14 commented May 21, 2019

In order to guarantee the formatting and marshaling of timestamp formats, I created repo.APITime to protect inputs matching time.RFC3339 and time.RFC3339Nano formats while also having a pattern to follow for future flexibility around time presentation in our JSON API.

Closes #1571

@placer14 placer14 requested a review from cpacia May 21, 2019 15:56
@coveralls
Copy link

coveralls commented May 21, 2019

Coverage Status

Coverage increased (+0.03%) to 35.558% when pulling 536b37a on 1571-update-timestamp into 4177b79 on master.

Also:
- extract chat models into repo/chat_message.go
- make repo.APITime a struct that embeds a time to get free access to
  time.Time methods
@placer14 placer14 force-pushed the 1571-update-timestamp branch from a548d42 to 536b37a Compare May 22, 2019 18:34
@placer14
Copy link
Member Author

placer14 commented May 23, 2019

Small documentation included in OpenBazaar/official_docs#10 and validated Existing postman docs show accurate representations of timestamps. Update PR to include missing endpoints.

@placer14 placer14 requested a review from cpacia May 23, 2019 16:38
@cpacia cpacia merged commit cacb790 into master May 28, 2019
@cpacia cpacia deleted the 1571-update-timestamp branch July 15, 2019 11:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate JSON API timestamps to RFC3339
3 participants