File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed
Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,7 @@ module.exports = {
3737 from_currency : fromCurrency ,
3838 conv_currency : convCurrency ,
3939 rate : data . price ,
40- date : new Date ( data [ 'last_updated' ] )
41- . toISOString ( )
42- . substring ( 0 , 10 ) ,
40+ date : data [ 'last_updated' ] ,
4341 } ;
4442 } )
4543 . catch ( ( err ) => {
Original file line number Diff line number Diff line change @@ -32,9 +32,7 @@ module.exports = {
3232 from_currency : fromCurrency ,
3333 conv_currency : convCurrency ,
3434 rate : rate ,
35- date : new Date ( data [ 'timestamp' ] )
36- . toISOString ( )
37- . substring ( 0 , 10 ) ,
35+ date : data [ 'timestamp' ] ,
3836 } ;
3937 } )
4038 . catch ( ( err ) => {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS currency(
22 from_currency TEXT NOT NULL ,
33 conv_currency TEXT NOT NULL ,
44 rate NUMERIC NOT NULL ,
5- date DATE NOT NULL
5+ date TIMESTAMP NOT NULL
66);
77
88CREATE INDEX IF NOT EXISTS currency_from_currency_conv_currency_idx
You can’t perform that action at this time.
0 commit comments