mirror of
https://github.com/bytedream/docker4ssh.git
synced 2025-06-27 01:40:32 +02:00
Initial commit
This commit is contained in:
16
server/api/info.go
Normal file
16
server/api/info.go
Normal file
@ -0,0 +1,16 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"docker4ssh/ssh"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type infoGetResponse struct {
|
||||
ContainerID string `json:"container_id"`
|
||||
}
|
||||
|
||||
func InfoGet(w http.ResponseWriter, r *http.Request, user *ssh.User) (interface{}, int) {
|
||||
return infoGetResponse{
|
||||
ContainerID: user.Container.FullContainerID,
|
||||
}, http.StatusOK
|
||||
}
|
Reference in New Issue
Block a user