Git Product home page Git Product logo

loopback-connector-firestore's People

Contributors

arkgast avatar cbullokles avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dyaa avatar henriquecarv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

loopback-connector-firestore's Issues

Error on Post request with GeoPoint property

Hi! Thanks for that good connector.

There's an issue on posting an instance of a model that contains a GeoPoint property. Example:

{
  "name": "string",
  "capacity": 0,
  "description": "string",
  "location": {
    "lat": 0,
    "lng": 0
  }
}

Posting this exact data parameter on the Post request results in this 500 code error:

{
  "error": {
    "statusCode": 500,
    "name": "Error",
    "message": "Cannot encode type ([object Object]) to a Firestore Value",
    "stack": "Error: Cannot encode type ([object Object]) to a Firestore Value\n    at Function.encodeValue (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/@google-cloud/firestore/src/document.js:672:11)\n    at Function.encodeFields (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/@google-cloud/firestore/src/document.js:544:36)\n    at WriteBatch.set (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/@google-cloud/firestore/src/write-batch.js:257:35)\n    at DocumentReference.set (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/@google-cloud/firestore/src/reference.js:416:8)\n    at CollectionReference.add (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/@google-cloud/firestore/src/reference.js:1830:24)\n    at Firestore.create (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-connector-firestore/lib/firestore.js:61:29)\n    at invokeConnectorMethod (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/dao.js:169:21)\n    at /Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/dao.js:472:11\n    at doNotify (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/observer.js:155:49)\n    at doNotify (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/observer.js:155:49)\n    at doNotify (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/observer.js:155:49)\n    at doNotify (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/observer.js:155:49)\n    at Function.ObserverMixin._notifyBaseObservers (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/observer.js:178:5)\n    at Function.ObserverMixin.notifyObserversOf (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/observer.js:153:8)\n    at Function.ObserverMixin._notifyBaseObservers (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/observer.js:176:15)\n    at Function.ObserverMixin.notifyObserversOf (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/observer.js:153:8)"
  }
}

Another error by changing latto latitude and lng to longitude in the data parameter:

{
  "error": {
    "statusCode": 500,
    "name": "AssertionError",
    "message": "lat must be a number when creating a GeoPoint",
    "actual": false,
    "expected": true,
    "operator": "==",
    "generatedMessage": false,
    "stack": "AssertionError: lat must be a number when creating a GeoPoint\n    at new GeoPoint (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/geo.js:198:3)\n    at GeoPoint (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/geo.js:166:12)\n    at ModelConstructor.set [as location] (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/model-builder.js:606:81)\n    at ModelConstructor.ModelBaseClass._initProperties (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/model.js:202:17)\n    at ModelConstructor.ModelBaseClass (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/model.js:60:8)\n    at ModelConstructor (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/model-builder.js:196:22)\n    at ModelConstructor (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/model-builder.js:196:22)\n    at new ModelConstructor (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/model-builder.js:196:22)\n    at Function.DataAccessObject.create (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-datasource-juggler/lib/dao.js:359:13)\n    at SharedMethod.invoke (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/strong-remoting/lib/shared-method.js:270:25)\n    at HttpContext.invoke (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/strong-remoting/lib/http-context.js:297:12)\n    at phaseInvoke (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/strong-remoting/lib/remote-objects.js:677:9)\n    at runHandler (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-phase/lib/phase.js:135:5)\n    at iterate (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-phase/node_modules/async/lib/async.js:146:13)\n    at Object.async.eachSeries (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-phase/node_modules/async/lib/async.js:162:9)\n    at runHandlers (/Users/thomaslecoeur/Projets/Pijam/pijam-proto-api/node_modules/loopback-phase/lib/phase.js:144:13)"
  }
}

Using "loopback-connector-firestore": "^1.0.5" and "loopback": "^3.0.0"

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

How to get/set data from Firestore?

Can someone explain how to get/set/delete data from Firestore?
I tried this in my controller but it doesnt work:

@get('/firebase/doctors')
  async getDoctor(
  ): Promise<any> {
    return await this.doctorRepository.get('Doctor');
  }

Error at compling

(Error: Cannot create data source "FireStore": Cannot initialize connector "loopback-connector-firebase": FIREBASE FATAL ERROR: Cannot parse Firebase url. Please use https://.firebaseio.com )

Land version 1.0.8

When you think the version 1.0.8 will be landed?
I need to use limit, skip and other filters and the previous version has not these functionality.
Thank you.

Firestore configuration using express js on firebase cloud functions

Hi, i started using this project with express js and firebase cloud functions to build an api.

Cloud functions environment provides a method to configure firestore easily:

admin.initializeApp(functions.config().firebase);

But this connector uses credentials auth. It would be a nice option to use firebase configuration

Includes not working

Hey man, theres a simple way to use the "include" loopback function to query relationed models?

If, theres no easy way, could you give me some references for I create that on this connector, that would be wonderfull.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.