Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Fix types error for api-controller and demoDataSetup #169

Merged
merged 2 commits into from
Oct 27, 2017

Conversation

JameelB
Copy link
Contributor

@JameelB JameelB commented Oct 26, 2017

Description

Fix Typescript types errors

Additional Notes

Related Gist - https://gist.github.com/JameelB/bca467389fd1b58ea027b36b625e9793

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling ddb50f4 on JameelB:fix-types-error into ** on feedhenry-raincatcher:master**.

1 similar comment
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling ddb50f4 on JameelB:fix-types-error into ** on feedhenry-raincatcher:master**.

@@ -94,7 +94,7 @@ function wfmApiSetup(app: express.Router, connectionPromise: Promise<any>) {
});
}

function demoDataSetup(connectionPromise: Promise<Db>) {
function demoDataSetup(connectionPromise: Promise<any>) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the promise that's being passed here is really Db | undefined from line 31 I think we should look into where the undefined is coming from, might introduce a bug.

Copy link
Contributor Author

@JameelB JameelB Oct 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's due to the function that's giving back the connectionPromise as that may be void. https://github.com/feedhenry-raincatcher/raincatcher-core/blob/master/demo/server/src/modules/index.ts#L66-L83

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, might be worth it to handle that case in this function, even if it's just erroing out and printing it to the user.

paolobueno
paolobueno previously approved these changes Oct 26, 2017
Copy link
Contributor

@paolobueno paolobueno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix, just a little bit worried about the mongodb being possibly undefined.

@coveralls
Copy link

coveralls commented Oct 27, 2017

Coverage Status

Changes Unknown when pulling d9be08c on JameelB:fix-types-error into ** on feedhenry-raincatcher:master**.

@JameelB JameelB merged commit 2511dca into feedhenry-raincatcher:master Oct 27, 2017
paolobueno added a commit that referenced this pull request Nov 8, 2017
* master:
  Fix types error for api-controller and demoDataSetup (#169)
paolobueno added a commit that referenced this pull request Nov 8, 2017
* Fix types error for api-controller and demoDataSetup (#169)

* fix types error for api-controller and demoDataSetup

* handle undefined connectionPromise

* Fix compilation error
wtrocki pushed a commit that referenced this pull request Nov 15, 2017
* Fix types error for api-controller and demoDataSetup (#169)

* fix types error for api-controller and demoDataSetup

* handle undefined connectionPromise

* Fix compilation error
wtrocki added a commit that referenced this pull request Nov 20, 2017
* RAINCATCH-1351 - File Server (#156)

* WIP file sync client (#159)

* Use fetch api from filestore-client (#163)

* Use fetch to upload data

* Use fetch for download

* Improve upload calls

* [RAINCATCH-1350] Add camera package to support camera step (#164)

* Move camera class from step

* adjust package versions

* Add filestore dependency

* Remove data uri responsibility from file-upload

* Add index for exporting public interface

* Add used deps

* Add FileEntry interface, use updload from camera module

* Add todo item

* Fix typescript compilation errors (#166)

* Fix initialization callback order (#167)

* Minor tweaks (#168)

* Minor tweaks

* Refactoring

* Temporary untested changes

* Change filesystem query to resolveLocalFileSystemUrl (#170)

* Http file support

* fix file-store api (#174)

* Add interfaces to file manager (#173)

* Split files for interfaces, add httpclient interface

* Use interfaces from relevant code

* Fix type typo

* Add extra metadata to post request (#175)

* Remove extra route param

* Delete subproject

* Include extra metadata in post data

* [RAINCATCH-1389] Support base64 upload (#176)

* Fix sending data from browser as data-uri

* Accept base64 type for uploads

* Remove base64/

* Move Id generation to client (#177)

* Remove id generation from server

* Move file after upload

* Remove extra debugger call

* README for filestorage module (#178)

* Add initial readme content

* Add more jsdocs

* Ignore vscode extra config

* Add Readme and JSDocs to the filestore-client (#179)

* Add jsdocs

* add readme

* Update to master (#182)

* Fix types error for api-controller and demoDataSetup (#169)

* fix types error for api-controller and demoDataSetup

* handle undefined connectionPromise

* Fix compilation error

* Pre release (#183)

* Add public access to package.json for new packages

* Pre-release publishing

* [RAINCATCH-1388] Filestore tests (#180)

* Start refactoring for tests

* Add some tests for filestore

* Add tests for writeStreamToFile

* Finish tests for fileService

* Lower coverage reqs

* Rename storage class to match filename

* Add string type for createTemporaryStorageFolder

* Add first tests for gridfs storage

* Add tests for gridfs

* Update jsdocs

* Update package version to pre-release one

* update dependencies to match hoisted versions

* Fix hanging test

* [RAINCATCH-1386][WIP] Add unit tests for FileStore Client (#181)

* add tests for fileQueue

* add fileManager tests

* [RAINCATCH 1387] Tests for Camera (#184)

* Add tests for buildCameraOptions

* Add some mocks

* Update versions to match hoisted

* Add tests for capture()

* Fix linting and remove coverage check on unfinished tests

* Fix file queue tests

* Update dependencies

* Add snyk exception to s3

* Add generics to promisify call to avoid compilation errors

* Fix promisify

* Change version of filestore
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants