Minor changes
This commit is contained in:
parent
61f30677e8
commit
07a7b16f9a
|
@ -116,7 +116,7 @@ This document outlines the API endpoints for a simple inventory management syste
|
|||
* **GET /items/{id}:**
|
||||
* Retrieves the item with the specified ID.
|
||||
* Response: Item object
|
||||
* **GET /items/{id}/items:**
|
||||
* **GET /boxes/{id}/items:**
|
||||
* Retrieves all items within the box with the specified ID.
|
||||
* Response: Array of Item objects
|
||||
* **PUT /items/{id}:**
|
||||
|
|
|
@ -241,7 +241,7 @@ func GetItemImageHandler(w http.ResponseWriter, r *http.Request) {
|
|||
if err != nil {
|
||||
// Log the error for debugging, but don't return an HTTP error
|
||||
fmt.Println("Error opening image.", err)
|
||||
item.ImagePath = "images/default.png"
|
||||
item.ImagePath = "images/default.jpg"
|
||||
return
|
||||
}
|
||||
defer imageFile.Close()
|
||||
|
@ -250,7 +250,7 @@ func GetItemImageHandler(w http.ResponseWriter, r *http.Request) {
|
|||
imageData, err := io.ReadAll(imageFile)
|
||||
if err != nil {
|
||||
fmt.Println("Error reading image")
|
||||
item.ImagePath = "images/default.png"
|
||||
item.ImagePath = "images/default.jpg"
|
||||
return
|
||||
}
|
||||
contentType := http.DetectContentType(imageData)
|
||||
|
|
Loading…
Reference in New Issue