@@ 39-46 (lines=8) @@ | ||
36 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
|
37 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
|
38 | */ |
|
39 | public function deleteAction( ServerRequestInterface $request ) |
|
40 | { |
|
41 | if( config( 'shop.authorize', true ) ) { |
|
42 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'api']] ); |
|
43 | } |
|
44 | ||
45 | return $this->createAdmin()->delete( $request, new Response() ); |
|
46 | } |
|
47 | ||
48 | ||
49 | /** |
|
@@ 55-62 (lines=8) @@ | ||
52 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
|
53 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
|
54 | */ |
|
55 | public function getAction( ServerRequestInterface $request ) |
|
56 | { |
|
57 | if( config( 'shop.authorize', true ) ) { |
|
58 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'api', 'editor']] ); |
|
59 | } |
|
60 | ||
61 | return $this->createAdmin()->get( $request, new Response() ); |
|
62 | } |
|
63 | ||
64 | ||
65 | /** |
|
@@ 71-78 (lines=8) @@ | ||
68 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
|
69 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
|
70 | */ |
|
71 | public function patchAction( ServerRequestInterface $request ) |
|
72 | { |
|
73 | if( config( 'shop.authorize', true ) ) { |
|
74 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'api']] ); |
|
75 | } |
|
76 | ||
77 | return $this->createAdmin()->patch( $request, new Response() ); |
|
78 | } |
|
79 | ||
80 | ||
81 | /** |
|
@@ 87-94 (lines=8) @@ | ||
84 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
|
85 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
|
86 | */ |
|
87 | public function postAction( ServerRequestInterface $request ) |
|
88 | { |
|
89 | if( config( 'shop.authorize', true ) ) { |
|
90 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'api']] ); |
|
91 | } |
|
92 | ||
93 | return $this->createAdmin()->post( $request, new Response() ); |
|
94 | } |
|
95 | ||
96 | ||
97 | /** |
|
@@ 103-110 (lines=8) @@ | ||
100 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
|
101 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
|
102 | */ |
|
103 | public function putAction( ServerRequestInterface $request ) |
|
104 | { |
|
105 | if( config( 'shop.authorize', true ) ) { |
|
106 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'api']] ); |
|
107 | } |
|
108 | ||
109 | return $this->createAdmin()->put( $request, new Response() ); |
|
110 | } |
|
111 | ||
112 | ||
113 | /** |
|
@@ 119-126 (lines=8) @@ | ||
116 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
|
117 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
|
118 | */ |
|
119 | public function optionsAction( ServerRequestInterface $request ) |
|
120 | { |
|
121 | if( config( 'shop.authorize', true ) ) { |
|
122 | $this->authorize( 'admin', [JsonadmController::class, ['admin', 'api', 'editor']] ); |
|
123 | } |
|
124 | ||
125 | return $this->createAdmin()->options( $request, new Response() ); |
|
126 | } |
|
127 | ||
128 | ||
129 | /** |