Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
Homework_89_Tsoy_Danil
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Цой Данил
Homework_89_Tsoy_Danil
Commits
0fd51a75
Commit
0fd51a75
authored
Mar 23, 2023
by
Цой Данил
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#5
added token to headers
parent
46c9c424
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
3 deletions
+5
-3
.gitignore
public/uploads/albums/.gitignore
+0
-0
.gitignore
public/uploads/artists/.gitignore
+2
-0
albumsController.ts
src/controllers/albumsController.ts
+1
-1
artistsController.ts
src/controllers/artistsController.ts
+1
-1
trackHistoriesController.ts
src/controllers/trackHistoriesController.ts
+1
-1
No files found.
public/uploads/.gitignore
→
public/uploads/
albums/
.gitignore
View file @
0fd51a75
File moved
public/uploads/artists/.gitignore
0 → 100644
View file @
0fd51a75
*
!.gitignore
\ No newline at end of file
src/controllers/albumsController.ts
View file @
0fd51a75
...
...
@@ -8,7 +8,7 @@ import { EStatuses } from "../enum/EStatuses";
const
storage
=
multer
.
diskStorage
({
destination
(
req
,
file
,
callback
){
callback
(
null
,
config
.
filePath
)
callback
(
null
,
config
.
filePath
+
'/albums'
)
},
filename
(
req
,
file
,
callback
){
callback
(
null
,
shortid
.
generate
()
+
path
.
extname
(
file
.
originalname
))
...
...
src/controllers/artistsController.ts
View file @
0fd51a75
...
...
@@ -8,7 +8,7 @@ import { EStatuses } from "../enum/EStatuses";
const
storage
=
multer
.
diskStorage
({
destination
(
req
,
file
,
callback
){
callback
(
null
,
config
.
filePath
)
callback
(
null
,
config
.
filePath
+
'/artists'
)
},
filename
(
req
,
file
,
callback
){
callback
(
null
,
shortid
.
generate
()
+
path
.
extname
(
file
.
originalname
))
...
...
src/controllers/trackHistoriesController.ts
View file @
0fd51a75
...
...
@@ -17,7 +17,7 @@ export class TrackHistoriesController {
}
private
addTrackHistory
=
async
(
req
:
Request
,
res
:
Response
):
Promise
<
void
>
=>
{
const
trackHistoryDto
:
ITrackHistoryDto
=
req
.
body
const
trackHistoryDto
:
ITrackHistoryDto
=
{...
req
.
body
,
token
:
req
.
headers
.
token
}
const
response
=
await
this
.
service
.
addTrackHistory
(
trackHistoryDto
)
if
(
response
.
status
===
EStatuses
.
FAILURE
){
res
.
status
(
200
).
send
(
response
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment