ynput / ayon-backend

Server codebase with API access to AYON
Apache License 2.0
22 stars 16 forks source link

Events: sender_type property to differentiate between multiple event sources #399

Closed martastain closed 1 week ago

martastain commented 1 month ago

Endpoints that accepted "x-sender" header now also accept "x-sender-type". sender_type is stored in the database in the separate field. and it is available in the eventmodel.

@jakubjezek001 @iLLiCiTiT do you need to be able to filter by it in enroll somehow? if so, how?

iLLiCiTiT commented 1 week ago

All works good, but I have one note, enrolled events don't have sender type filled from headers and enroll endpoint does not allow to fill it.

martastain commented 1 week ago

All works good, but I have one note, enrolled events don't have sender type filled from headers and enroll endpoint does not allow to fill it.

Thanks. Good catch. I've added senderType to the request body and the enroll endpoint also supports providing sender and sender type values in headers. Both is optional, but when a value is specified both in the headers and the body, value from the body is used.

iLLiCiTiT commented 1 week ago

Thanks. Good catch. I've added senderType to the request body and the enroll endpoint also supports providing sender and sender type values in headers.

Nope, you didn't 🙂 , enroll still without sourceType.

martastain commented 1 week ago

@iLLiCiTiT i ALMOST did. it was just one git commit and git push away :) sorry