Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delete button to "video details" #1172

Merged
merged 6 commits into from
Jun 20, 2024

Commits on Jun 20, 2024

  1. Add migration for event deletion timestamp

    This migration also renames the `events` table
    and creates a new view holding all events without the
    deletion timestamp. This is done out of convenience as
    to avoid having to adjust every query with a check for
    that deletion timestamp.
    owi92 committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    9d507f8 View commit details
    Browse the repository at this point in the history
  2. Add OcClient to api context

    This is necessary in order to make authenticated
    http request in graphQL mutations and other api calls.
    owi92 committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    aaaba24 View commit details
    Browse the repository at this point in the history
  3. Add internal API functions to make http delete requests

    The underlying function calls the external OC event API
    to request the deletion of a single video and sets the
    `tobira_deletion_timestamp` in the video's DB entry.
    
    Unfortunately this API can't tell us if the deletion
    succeeded, only that the retraction of the event was started.
    That check and the following removal from the DB is done
    by inspecting the previously mentioned timestamp (implemented
    in the next commit).
    owi92 committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    fc0a95a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1d9e3f3 View commit details
    Browse the repository at this point in the history
  5. Adjust "My Videos" page to show pending/failed deletions

    "My Videos" will now indicate if a video has been deleted in
    Tobira, but not (yet) in Opencast. After the request has been
    sent, the deleted video will be marked as "delete pending".
    When the event hasn't been removed in sync after a minute,
    the deletion in Opencast has probably failed, so it gets marked
    accordingly.
    owi92 committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    e5549d9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    859f1a2 View commit details
    Browse the repository at this point in the history