Sync-Space-49 / syncspace-server

0 stars 0 forks source link

47 panels stacks cards #56

Closed DylanHalstead closed 11 months ago

DylanHalstead commented 11 months ago

Problem

See #47 for details Closes #47 Closes #57

Solution

Many functions have been added to the boarderRouter that handle CRUD options dealing with panels, stacks, and cards. Alongside the standard crud options, boards, panels, and cards have been given a /details which grabs all sub-components (for panels it grabs all its stacks and all cards related to that stack).

A part of this PR is more changes to the DB (shocker). They're fairly minor! Now the panel, stack, and cards ON DELETE CASCADE to remove any cleanup needed when deleting an item's parent.

Because a user now has A LOT of permissions, we have hit the cap on the amount of permissions we can get back from an API call from auth0. This was causing inconsistency in the methods, so permissions are now checked and sent through the token.

Testing

Boards

Create Board Still Works

image image image

Get Board Details

image No Panels: image Stack with no card: image

Panels

Get Panels

image Empty array if board has no panels: image

Create Panel

image image Missing title: image Missing create_panel perm: image

Get Panel

image

Update Panel

image image Missing update_panel perm: image Updating position: image image Attempting to update position to out-of-range value: image image

Delete Panel

image\ image

Stacks

Get Stacks

image Empty array if panel has no stack: image

Create Stack

image image Missing title: image

Get Stack

image

Update Stack

image image Updating position: image image Attempting to update position to out-of-range value: image image

Delete Stack

image image

Cards

Get Cards

image Empty array if stack has no card: image

Create Card

image image Missing title: image

Get Card

image

Update Card

image image Updating position: image image Attempting to update position to out-of-range value: image Moving Card to new stack/panel: image image Attempting to move Card to new stack/panel on another board: image

Delete Card

image image image

Did I test everything no? Am I pretty sure everything works well enough? Yes 😄 (and Tyler will let me know if it doesn't)