Skip to content

Commit 5ba568d

Browse files
author
Walker Leite
committed
feat(loopback): add DateString type support
1 parent a05a9eb commit 5ba568d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

template/client/services/loopback.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
import {host, restApiRoot, port} from '~/server/config.json';
21
import axios from 'axios';
2+
import {host, restApiRoot, port} from '~/server/config.json';
3+
import {DateString} from 'loopback';
4+
5+
DateString.parse = function(dateString) {
6+
const date = dateString.when || dateString;
7+
return new DateString(date);
8+
};
9+
10+
export {DateString};
311

412
const Storage = window.localStorage;
513

0 commit comments

Comments
 (0)