1
0
Fork 0

Merge pull request #1789 from pixelfed/staging

Staging
This commit is contained in:
daniel 2019-10-17 01:21:28 -06:00 committed by GitHub
commit 90917006b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 13 deletions

View File

@ -32,6 +32,10 @@
- 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 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

View File

@ -310,15 +310,8 @@ class BaseApiController extends Controller
{
$user = $request->user();
abort_if(!$user, 403);
$id = $user->id;
$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;
});
$resource = new Fractal\Resource\Item($user->profile, new AccountTransformer());
$res = $this->fractal->createData($resource)->toArray();
return response()->json($res);
}

View File

@ -48,7 +48,7 @@ class MediaController extends Controller
$path = $photo->storeAs($dir, $name);
$res = [];
$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);
return $res;

View File

@ -57,7 +57,7 @@ class StatusHashtagService {
public static function 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 StatusHashtag::whereHashtagId($id)->count();
});

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@
"/js/compose-classic.js": "/js/compose-classic.js?id=e7483681a575c190a43b",
"/js/developers.js": "/js/developers.js?id=9636d4060ca6b359d8a2",
"/js/discover.js": "/js/discover.js?id=fbc49123fc2ce2ff7acf",
"/js/hashtag.js": "/js/hashtag.js?id=1e5990f89b6bfe7e037b",
"/js/hashtag.js": "/js/hashtag.js?id=3fe97ed3f975f0e0baa5",
"/js/loops.js": "/js/loops.js?id=9c31302552d789d5f35b",
"/js/mode-dot.js": "/js/mode-dot.js?id=993d7fee684361edddbc",
"/js/profile.js": "/js/profile.js?id=749e6e867d987d8d4522",

View File

@ -110,6 +110,7 @@
beforeMount() {
this.authenticated = $('body').hasClass('loggedIn');
this.getResults();
this.hashtagCount = window.App.util.format.count(this.hashtagCount);
},
methods: {
getResults() {