MCPcopy
hub / github.com/eyebluecn/tank / Detail

Method Detail

code/rest/image_cache_controller.go:45–61  ·  view source on GitHub ↗
(writer http.ResponseWriter, request *http.Request)

Source from the content-addressed store, hash-verified

43}
44
45func (this *ImageCacheController) Detail(writer http.ResponseWriter, request *http.Request) *result.WebResult {
46
47 uuid := request.FormValue("uuid")
48 if uuid == "" {
49 panic(result.BadRequest("uuid cannot be null"))
50 }
51
52 imageCache := this.imageCacheService.Detail(uuid)
53
54 user := this.checkUser(request)
55 if imageCache.UserUuid != user.Uuid {
56 panic(result.UNAUTHORIZED)
57 }
58
59 return this.Success(imageCache)
60
61}
62
63func (this *ImageCacheController) Page(writer http.ResponseWriter, request *http.Request) *result.WebResult {
64

Callers

nothing calls this directly

Calls 3

BadRequestFunction · 0.92
checkUserMethod · 0.80
SuccessMethod · 0.80

Tested by

no test coverage detected