Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
C_Team_KhuDrive
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
김재형
2020-06-08 15:56:09 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
de4e8d2805b5a7093e5385323740335150b1718e
de4e8d28
1 parent
924670aa
Implement dummy file share api and search api
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
frontend/src/server.ts
frontend/src/server.ts
View file @
de4e8d2
...
...
@@ -166,6 +166,62 @@ createServer({
};
});
this
.
post
(
"/items/:item_id/share"
,
(
schema
,
request
)
=>
{
return
{
status
:
200
,
user_id
:
1
,
shared
:
"2020-05-14T06:20:44Z"
,
data
:
{
id
:
"2342"
,
name
:
"image.jpg"
,
is_folder
:
false
,
size
:
92929
,
path
:
"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"
,
created_timestamp
:
"2020-05-14T06:20:44Z"
,
updated_timestamp
:
"2020-05-14T06:20:44Z"
,
},
};
});
this
.
post
(
"/shared/:shared_item_id"
,
(
schema
,
request
)
=>
{
return
{
status
:
200
,
data
:
{
name
:
"image.jpg"
,
size
:
92929
,
path
:
"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"
,
},
};
});
this
.
post
(
"/items/search"
,
(
schema
,
request
)
=>
{
return
{
status
:
200
,
data
:
{
list
:
[
{
id
:
"2341"
,
is_folder
:
true
,
name
:
"cloudComputing"
,
created_timestamp
:
"2020-05-14T06:20:44Z"
,
updated_timestamp
:
"2020-05-14T06:20:44Z"
,
size
:
0
,
},
{
id
:
"2341"
,
is_folder
:
true
,
name
:
"cloudComputing"
,
created_timestamp
:
"2020-05-14T06:20:44Z"
,
updated_timestamp
:
"2020-05-14T06:20:44Z"
,
size
:
0
,
},
],
},
};
});
this
.
post
(
"/users/login"
,
(
schema
,
request
)
=>
{
const
body
=
JSON
.
parse
(
request
.
requestBody
);
const
admin
=
schema
.
findBy
(
"user"
,
{
...
...
Please
register
or
login
to post a comment