mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-04 17:33:21 +08:00
Added API endpoint to get available instance images
This commit is contained in:
14
handlers/get_instance_images.go
Normal file
14
handlers/get_instance_images.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/franela/play-with-docker/services"
|
||||
)
|
||||
|
||||
func GetInstanceImages(rw http.ResponseWriter, req *http.Request) {
|
||||
instanceImages := services.InstanceImages()
|
||||
json.NewEncoder(rw).Encode(instanceImages)
|
||||
}
|
||||
|
Reference in New Issue
Block a user