在loopback3中的CustomAccessToken模型中将userId设置为NaN

时间:2019-08-24 12:53:10

标签: loopbackjs loopback

我在let mapper = { 'g1': 1, 'g2': 2, 'g3': 3 } let final = "ZqE".replace(/(q)|([zZ])|(E)/g, (m, g1, g2, g3) => { return g1 !== undefined && mapper['g1'] || g2 !== undefined && mapper['g2'] || g3 !== undefined && mapper['g3'] }) console.log(final)模型的@media (min-width: 576px) { .col1 {...} .col2 {...} .col3 {...} } @media (min-width: 768px) { .col1 {...} .col2 {...} .col3 {...} } 中得到NaN。我正在使用回送3和userId。我正在使用CustomAccessToken来定义UserType1和userType2模型中的ID。

我已经尝试了详细的调试,但是无法弄清楚为什么postgres被设置为NaN。

我有以下型号。

CustomAccessToken

uuid

UserType1

userId

UserType2

{
  "name": "CustomAccessToken",
  "base": "AccessToken",
  "properties": {},
  "validations": [],
  "relations": {
    "user": {
      "type": "belongsTo",
      "idName": "id",
      "polymorphic": {
        "idType": "string",
        "foreignKey": "userId",
        "discriminator": "principalType"
      }
    }
  },
  "acls": [],
  "methods": {}
}

0 个答案:

没有答案