mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-05 23:15:07 -06:00
chore: remove extension from LICENSE file
Also slight refactor for NewBaseServiceRequest
This commit is contained in:
@@ -45,13 +45,15 @@ type BaseServiceRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewBaseServiceRequest(entityId string) BaseServiceRequest {
|
func NewBaseServiceRequest(entityId string) BaseServiceRequest {
|
||||||
bsr := BaseServiceRequest{
|
|
||||||
id := internal.NextId()
|
id := internal.NextId()
|
||||||
|
request := BaseServiceRequest{
|
||||||
Id: id,
|
Id: id,
|
||||||
RequestType: "call_service",
|
RequestType: "call_service",
|
||||||
}
|
}
|
||||||
|
|
||||||
if entityId != "" {
|
if entityId != "" {
|
||||||
bsr.Target.EntityId = entityId
|
request.Target.EntityId = entityId
|
||||||
}
|
}
|
||||||
return bsr
|
|
||||||
|
return request
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user