1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-01-04 05:01:13 +00:00

Auto-refresh expired profile pictures

This commit is contained in:
Cadence Ember
2020-04-05 02:57:31 +12:00
parent f4969f86db
commit 9fd9a00932
7 changed files with 143 additions and 16 deletions

View File

@@ -5,6 +5,13 @@ function proxyImage(url, width) {
return "/imageproxy?"+params.toString()
}
function proxyProfilePic(url, userID) {
const params = new URLSearchParams()
params.set("userID", userID)
params.set("url", url)
return "/imageproxy?"+params.toString()
}
function proxyVideo(url) {
const params = new URLSearchParams()
params.set("url", url)
@@ -21,5 +28,6 @@ function proxyExtendedOwner(owner) {
}
module.exports.proxyImage = proxyImage
module.exports.proxyProfilePic = proxyProfilePic
module.exports.proxyVideo = proxyVideo
module.exports.proxyExtendedOwner = proxyExtendedOwner