Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
A
avatar-handler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
avatar-handler
Commits
ee0cc0ae
Commit
ee0cc0ae
authored
Sep 17, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change hints
parent
33ca8dd5
Pipeline
#779
passed with stages
in 16 minutes and 18 seconds
Changes
2
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/app.ts
src/app.ts
+1
-1
src/avatar.ts
src/avatar.ts
+1
-1
No files found.
src/app.ts
View file @
ee0cc0ae
...
...
@@ -30,7 +30,7 @@ app.get('/user_avatar/ygobbs.com/:username/:size/:filename.png', async(req, res,
{
'
Content-Type
'
:
'
image/png
'
}
).
send
(
buffer
);
}
else
{
res
.
status
(
40
0
).
send
(
`Failed to fetch avatar
.`
);
res
.
status
(
40
4
).
send
(
`Avatar not found
.`
);
}
});
...
...
src/avatar.ts
View file @
ee0cc0ae
...
...
@@ -99,7 +99,7 @@ export class Avatar {
responseType
:
"
arraybuffer
"
})).
data
as
Buffer
;
}
catch
(
e
)
{
console
.
error
(
`Error fetching original image of
${
username
}
${
url
}
:
${
e
.
toString
()}
`
);
console
.
error
(
`Error fetching original image of
${
username
}
${
url
}
:
${
e
.
toString
()}
`
);
return
null
;
}
content
=
buffer
.
toString
(
"
base64
"
);
...
...
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