Skip to content

Create new Album Routes #472

@rahulharpal1603

Description

@rahulharpal1603

After my #466 PR is merged, we need to create the full backend support for the Albums table defined in this diagram:

https://dbdiagram.io/d/PictoPy-685704c4f039ec6d364647e1

First, create a database file that has all the DB utils and table creation functions. Remember, we need to have hidden albums too, even if we show the hidden albums, the user will require password to open a hidden album.

Then implement these routes:

Core Album Operations

GET /albums/

Get all albums

  • Query params: show_hidden=true/false (default: false)

POST /albums/

Create a new album

GET /albums/{album_id}

Get specific album details

PUT /albums/{album_id}

Update album (name, description, visibility, password)

DELETE /albums/{album_id}

Delete an album

Image Management

GET /albums/{album_id}/images

Get all images in an album

POST /albums/{album_id}/images

Add images to an album

DELETE /albums/{album_id}/images/{image_id}

Remove image from album

DELETE /albums/{album_id}/images

Remove multiple images from album

  • Body: { image_ids: [uuid, uuid, ...] }

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions