Skip to content

Commit ecc04cc

Browse files
poltibdrew-gross
authored andcommitted
Fix getLogs function (parse-community#370)
Right now the parse-dashboard is sending always the same 10 first info logs because no params are sent (it uses the default params from the parse-server). Here the params are send in the querystring. If someone has a better solution I'm interested :)
1 parent 0200bff commit ecc04cc

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/lib/ParseApp.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,8 @@ export default class ParseApp {
9999
* since - only fetch lines since this Date
100100
*/
101101
getLogs(level, since) {
102-
let params = {
103-
level: level,
104-
n: 100,
105-
};
106-
if (since) {
107-
params.startDate = since.getTime();
108-
}
109-
return this.apiRequest('GET', 'scriptlog', params, { useMasterKey: true });
102+
let path = 'scriptlog?level=' + encodeURIComponent(level.toLowerCase()) + '&n=100' + (since?'&startDate=' + encodeURIComponent(since.getTime()):'');
103+
return this.apiRequest('GET', path, {}, { useMasterKey: true });
110104
}
111105

112106
/**

0 commit comments

Comments
 (0)