somakeit / door-controller2

A new door controller for a new space, where all the previous hardware is broken and we can't replace it.
1 stars 0 forks source link

Add array of successful auth timestamps to the POST #10

Closed brackendawson closed 8 years ago

brackendawson commented 8 years ago

And assigned_user tag

benjie commented 8 years ago

Door will send something of this form to members area:

scans is an array of objects, each object has the following keys:

{
  "tags": {
    "abcdefg": {
      "assigned_user": "00003",
      "count": 7,
      "scans": [
        {
          "date": 123123123,
          "location": "door"
        },
        {
          "date": 123123456,
          "location": "lathe"
        }
      ]
    },
    "01234567": {
      "assigned_user": "00003",
      "count": 8,
      "scans": [
        {
          "date": 123123123,
          "location": "door"
        }
      ]
    },
    "newnew12": {
      "assigned_user": null,
      "count": 1,
      "sector_a_key_a": "a2V5IGEA",
      "sector_a_key_b": "a2V5IGIA",
      "sector_a_secret": "hoteEaISPm56KrcIX67fMWRWEm3GmZU=",
      "sector_a_sector": 1,
      "sector_b_key_a": "a2V5IGEA",
      "sector_b_key_b": "a2V5IGIA",
      "sector_b_secret": "fp6C+KijosMbvxMF9vo3cNS2c98oSGY=",
      "sector_b_sector": 2
    }
  }
}

:tada:

brackendawson commented 8 years ago

http://www.commitstrip.com/wp-content/uploads/2015/10/Strip-Trouver-le-nom-de-variable-english650-final.jpg

brackendawson commented 8 years ago

closed by cf5dc4c

brackendawson commented 8 years ago

Due to roles, I will be be sending this format:

{
    "tags": {
        "035a53b6": {
            "assigned_user": "00003",
            "count": 33,
            "scans": [
                {
                    "date": 1446162553,
                    "location": "door",
                    "result": "allowed"
                }
            ]
        },
        "9b8785b5": {
            "assigned_user": "00000",
            "count": 4820,
            "scans": [
                {
                    "date": 1446162552,
                    "location": "door",
                    "result": "denied"
                }
            ]
        }
    }
}
benjie commented 8 years ago

:+1: