mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
commit
90917006b3
7 changed files with 9 additions and 11 deletions
|
@ -32,6 +32,10 @@
|
||||||
- Updated ComposeModal.vue, added album support, editing and UI tweaks ([3aaad81e](https://github.com/pixelfed/pixelfed/commit/3aaad81e))
|
- Updated ComposeModal.vue, added album support, editing and UI tweaks ([3aaad81e](https://github.com/pixelfed/pixelfed/commit/3aaad81e))
|
||||||
- Updated InternalApiController, increase license limit to 140 to match UI counter ([b3c18aec](https://github.com/pixelfed/pixelfed/commit/b3c18aec))
|
- Updated InternalApiController, increase license limit to 140 to match UI counter ([b3c18aec](https://github.com/pixelfed/pixelfed/commit/b3c18aec))
|
||||||
- Updated album carousels, fix height bug ([8380822a](https://github.com/pixelfed/pixelfed/commit/8380822a))
|
- Updated album carousels, fix height bug ([8380822a](https://github.com/pixelfed/pixelfed/commit/8380822a))
|
||||||
|
- Updated MediaController, add timestamp to signed preview url ([49efaae9](https://github.com/pixelfed/pixelfed/commit/49efaae9))
|
||||||
|
- Updated BaseApiController, uncache verify_credentials method ([3fa9ac8b](https://github.com/pixelfed/pixelfed/commit/3fa9ac8b))
|
||||||
|
- Updated StatusHashtagService, reduce cached hashtag count ttl from 6 hours to 5 minutes ([126886e8](https://github.com/pixelfed/pixelfed/commit/126886e8))
|
||||||
|
- Updated Hashtag.vue component, added formatted posts count ([c71f3dd1](https://github.com/pixelfed/pixelfed/commit/c71f3dd1))
|
||||||
|
|
||||||
## Deprecated
|
## Deprecated
|
||||||
|
|
||||||
|
|
|
@ -310,15 +310,8 @@ class BaseApiController extends Controller
|
||||||
{
|
{
|
||||||
$user = $request->user();
|
$user = $request->user();
|
||||||
abort_if(!$user, 403);
|
abort_if(!$user, 403);
|
||||||
$id = $user->id;
|
$resource = new Fractal\Resource\Item($user->profile, new AccountTransformer());
|
||||||
|
$res = $this->fractal->createData($resource)->toArray();
|
||||||
$res = Cache::remember('user:account:id:'.$id, now()->addHours(6), function() use($id) {
|
|
||||||
$profile = Profile::whereNull('status')->whereUserId($id)->firstOrFail();
|
|
||||||
$resource = new Fractal\Resource\Item($profile, new AccountTransformer());
|
|
||||||
$res = $this->fractal->createData($resource)->toArray();
|
|
||||||
return $res;
|
|
||||||
});
|
|
||||||
|
|
||||||
return response()->json($res);
|
return response()->json($res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ class MediaController extends Controller
|
||||||
$path = $photo->storeAs($dir, $name);
|
$path = $photo->storeAs($dir, $name);
|
||||||
$res = [];
|
$res = [];
|
||||||
$res['url'] = URL::temporarySignedRoute(
|
$res['url'] = URL::temporarySignedRoute(
|
||||||
'temp-media', now()->addHours(1), ['profileId' => $media->profile_id, 'mediaId' => $media->id]
|
'temp-media', now()->addHours(1), ['profileId' => $media->profile_id, 'mediaId' => $media->id, 'timestamp' => time()]
|
||||||
);
|
);
|
||||||
ImageOptimize::dispatch($media);
|
ImageOptimize::dispatch($media);
|
||||||
return $res;
|
return $res;
|
||||||
|
|
|
@ -57,7 +57,7 @@ class StatusHashtagService {
|
||||||
public static function count($id)
|
public static function count($id)
|
||||||
{
|
{
|
||||||
$key = 'pf:services:status-hashtag:count:' . $id;
|
$key = 'pf:services:status-hashtag:count:' . $id;
|
||||||
$ttl = now()->addHours(6);
|
$ttl = now()->addMinutes(5);
|
||||||
return Cache::remember($key, $ttl, function() use($id) {
|
return Cache::remember($key, $ttl, function() use($id) {
|
||||||
return StatusHashtag::whereHashtagId($id)->count();
|
return StatusHashtag::whereHashtagId($id)->count();
|
||||||
});
|
});
|
||||||
|
|
BIN
public/js/hashtag.js
vendored
BIN
public/js/hashtag.js
vendored
Binary file not shown.
Binary file not shown.
|
@ -110,6 +110,7 @@
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
this.authenticated = $('body').hasClass('loggedIn');
|
this.authenticated = $('body').hasClass('loggedIn');
|
||||||
this.getResults();
|
this.getResults();
|
||||||
|
this.hashtagCount = window.App.util.format.count(this.hashtagCount);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getResults() {
|
getResults() {
|
||||||
|
|
Loading…
Reference in a new issue