Use Mix.Project.config/0 to get version at compile time

This commit is contained in:
Adrian Kumpf
2021-03-13 21:06:12 +01:00
parent 323eb0dd26
commit 6d31adba00
4 changed files with 5 additions and 4 deletions

View File

@@ -10,8 +10,9 @@ defmodule TeslaApi.Auth do
@client_secret "c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093bb2fa3"
@redirect_uri "https://auth.tesla.com/void/callback"
@version Mix.Project.config()[:version]
@default_headers [
{"user-agent", "TeslaMate/#{Application.spec(:teslamate, :vsn)}"},
{"user-agent", "TeslaMate/#{@version}"},
{"Accept", "*/*"},
{"Accept-Encoding", "gzip, deflate, br"},
{"Connection", "keep-alive"}