Closed seveibar closed 1 year ago
So, I could think of two possible solutions:
The first solution is the easiest one, make the second access code a not native schedule.
In the other one, we will need to add a new variable to know if we should schedule on the device or not.
After discussing with Seve and Ravi, we have come to a consensus that proceeding with this feature at the moment is not ideal. This is primarily due to the numerous edge cases that this feature entails.
Prerequisites
Description
You cannot create two
time_bound
access codes that share the sameSteps to Reproduce
POST /access_codes/create
{ device_id, code: "1234", starts_at: now(), ends_at: now() + ms("1d") }
POST /access_codes/create
{ device_id, code: "1234", starts_at: now() + ms("1w"), ends_at: now() + ms("1w") + ms("1d") }
Returns aduplicate_code
errorExpected behavior: Allow the creation of both codes
Actual behavior: Errors with
duplicate_code
Additional Information