Skip to content

Commit caa2cc9

Browse files
committed
Reverse likes on client, loopback suuuuuuucks
1 parent a6c7d72 commit caa2cc9

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/config/dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import baseConfig from './base';
44

55
let config = {
66
appEnv: 'dev', // feel free to remove the appEnv property here
7-
apiBase: 'http://localhost:8888/api/',
7+
apiBase: 'http://localhost:8888/v0/',
88
crossStorageRules: [
99
{
1010
origin: /localhost:3030$/,

src/sources/users.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,13 @@ const users = {
104104
*/
105105
fetchUserLikedArtwork: function(userId = 'current', filter = {}) {
106106
let defaultFilter = {
107-
// limit: config.perPage
107+
order: 'created DESC'
108108
};
109109
let finalFilter = Object.assign({}, defaultFilter, filter);
110-
return fetchJSON(`${modelPrefix}/${userId}/liked_artwork`, { data: finalFilter });
110+
return fetchJSON(`${modelPrefix}/${userId}/liked_artwork`, { data: finalFilter })
111+
.then(likes => {
112+
return likes.reverse();
113+
});
111114
},
112115

113116
/**

0 commit comments

Comments
 (0)