room reservation model, controller, seeder and migration files added
This commit is contained in:
+12
-2
@@ -289,21 +289,31 @@ Deletes a category.
|
||||
|
||||
## Images
|
||||
|
||||
### List Images
|
||||
Retrieves a list of all uploaded images.
|
||||
|
||||
- **URL:** `/api/images`
|
||||
- **Method:** `GET`
|
||||
- **Authentication:** Required (Admin)
|
||||
- **Response:** `[{"filename": "...", "url": "...", "thumbnailUrl": "..."}]`
|
||||
|
||||
### Upload Image
|
||||
Uploads an image for menu items or categories. Supported extensions: jpg, jpeg, png, webp, gif. Max size: 10mb.
|
||||
Uploads an image for menu items or categories. Supported extensions: jpg, jpeg, png, webp, gif. Max size: 10mb. Automatically generates a 200px wide thumbnail.
|
||||
|
||||
- **URL:** `/api/images/upload`
|
||||
- **Method:** `POST`
|
||||
- **Authentication:** Required (Admin)
|
||||
- **Body:**
|
||||
- `image` (file, required): The image file to upload.
|
||||
- **Response:** `{"filename": "...", "url": "..."}`
|
||||
- **Response:** `{"filename": "...", "url": "...", "thumbnailUrl": "..."}`
|
||||
|
||||
### Show Image
|
||||
Retrieves and displays a previously uploaded image.
|
||||
|
||||
- **URL:** `/api/images/:filename`
|
||||
- **Method:** `GET`
|
||||
- **Query Parameters:**
|
||||
- `type` (string, optional): Use `thumbnail` to retrieve the 200px wide thumbnail.
|
||||
- **Response:** Image stream with correct MIME type.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user