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 route for shared library api #1690

Merged
merged 1 commit into from
Feb 10, 2023
Merged

Add delete route for shared library api #1690

merged 1 commit into from
Feb 10, 2023

Conversation

knolleary
Copy link
Member

Description

Adds support for deleting entries from the Shared Team Library

  • DELETE /storage/library/:libraryId/:path

Response:

  • { "status": "okay", "deleteCount": <how many things were deleted> }

If path matches a single entry (ie a 'file') the file is deleted (deleteCount: 1)
If path matches a folder, all entries beneath that folder are deleted. (deleteCount: n)
If path doesn't match anything, it 404s.

An optional type=<type> parameter can be included to restrict the operation to library entries of a particular type. Whilst this isn't necessarily needed by the UI, it is consistent with the GET api that Node-RED requires to be able to filter by type.

Related Issue(s)

#1597

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • [-] Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • [-] Changes flowforge.yml?
    • Issue/PR raised on flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

@joepavitt joepavitt mentioned this pull request Feb 10, 2023
7 tasks
@joepavitt
Copy link
Contributor

thanks for turning that round so quickly Nick - will review/merge once tests have run

Copy link
Contributor

@Pezmc Pezmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an extra tests is needed, but otherwise 👍

@Pezmc Pezmc merged commit e6a87b6 into main Feb 10, 2023
@Pezmc Pezmc deleted the delete-library-entry branch February 10, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants