History - AppleGamer22/scr-web GitHub Wiki

History Database Document

  • Document ID
    • String object
    • key of _id
    • format of ${type}/${owner}/${post}
      • type can be "instagram", "highlight", "story", "tiktok" or "vsco"
  • Array of URLs (Array of String objects)
  • User ID (key of U_ID, String object)
  • Social network type ("instagram" or "vsco")

Server API

GET api/history/:type

  1. Accepts HTTP header with JWT in the Authorisation field,
  2. returns an Array of History documents with the type specified.

PATCH api/history/

  1. Accepts HTTP header with JWT in the Authorisation field and an HTTP body of {history: History, urlToDelete: String},
  2. Removes the specified URL from the specified History document.