김재형

Implement dummy file share api and search api

...@@ -166,6 +166,62 @@ createServer({ ...@@ -166,6 +166,62 @@ createServer({
166 }; 166 };
167 }); 167 });
168 168
169 + this.post("/items/:item_id/share", (schema, request) => {
170 + return {
171 + status: 200,
172 + user_id: 1,
173 + shared: "2020-05-14T06:20:44Z",
174 + data: {
175 + id: "2342",
176 + name: "image.jpg",
177 + is_folder: false,
178 + size: 92929,
179 + path:
180 + "https://presignedurldemo.s3.eu-west-2.amazonaws.com/image.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJJWZ7B6WCRGMKFGQ%2F20180210%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20180210T171315Z&X-Amz-Expires=1800&X-Amz-Signature=12b74b0788aa036bc7c3d03b3f20c61f1f91cc9ad8873e3314255dc479a25351&X-Amz-SignedHeaders=host",
181 + created_timestamp: "2020-05-14T06:20:44Z",
182 + updated_timestamp: "2020-05-14T06:20:44Z",
183 + },
184 + };
185 + });
186 +
187 + this.post("/shared/:shared_item_id", (schema, request) => {
188 + return {
189 + status: 200,
190 + data: {
191 + name: "image.jpg",
192 + size: 92929,
193 + path:
194 + "https://presignedurldemo.s3.eu-west-2.amazonaws.com/image.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJJWZ7B6WCRGMKFGQ%2F20180210%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20180210T171315Z&X-Amz-Expires=1800&X-Amz-Signature=12b74b0788aa036bc7c3d03b3f20c61f1f91cc9ad8873e3314255dc479a25351&X-Amz-SignedHeaders=host",
195 + },
196 + };
197 + });
198 +
199 + this.post("/items/search", (schema, request) => {
200 + return {
201 + status: 200,
202 + data: {
203 + list: [
204 + {
205 + id: "2341",
206 + is_folder: true,
207 + name: "cloudComputing",
208 + created_timestamp: "2020-05-14T06:20:44Z",
209 + updated_timestamp: "2020-05-14T06:20:44Z",
210 + size: 0,
211 + },
212 + {
213 + id: "2341",
214 + is_folder: true,
215 + name: "cloudComputing",
216 + created_timestamp: "2020-05-14T06:20:44Z",
217 + updated_timestamp: "2020-05-14T06:20:44Z",
218 + size: 0,
219 + },
220 + ],
221 + },
222 + };
223 + });
224 +
169 this.post("/users/login", (schema, request) => { 225 this.post("/users/login", (schema, request) => {
170 const body = JSON.parse(request.requestBody); 226 const body = JSON.parse(request.requestBody);
171 const admin = schema.findBy("user", { 227 const admin = schema.findBy("user", {
......