[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnCall functions does not handle Date in return data #988

Open
niklv opened this issue Oct 12, 2021 · 1 comment
Open

OnCall functions does not handle Date in return data #988

niklv opened this issue Oct 12, 2021 · 1 comment

Comments

@niklv
Copy link
niklv commented Oct 12, 2021

[REQUIRED] Version info

node: 14.17.2

firebase-functions: 3.15.7

firebase-tools: 9.20.0

firebase-admin: 9.12.0

[REQUIRED] Test case

const functions = require("firebase-functions")

module.exports.testFunc = functions.https.onCall((data, req) => ({
  d: new Date()
}))

[REQUIRED] Steps to reproduce

  1. Run emulator
  2. Make functions request

[REQUIRED] Expected behavior

Response must contain ISO formatted date. Like:

{
  "result": {
    "d": "2021-10-12T13:11:44.977Z"
  }
}

[REQUIRED] Actual behavior

Response must contain ISO formatted date. Like:

{
  "result": {
    "d": {}
  }
}
@inlined
Copy link
Member
inlined commented Oct 21, 2021

Dates are not part of the encoding specification for the onCall API. This is still a reasonable feature request. I'll label it as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants