Skip to content

Commit

Permalink
Règler problème encodage code secret; règler problème types langues
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Jun 27, 2024
1 parent a0e48a6 commit dd92ccf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@ version = "1.0.0"
[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
FileWatching = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
WebSockets = "104b5d7c-a370-577a-8038-80a2059c5097"

[compat]
JSON = "0.21"
DataFrames = "1"
WebSockets = "1"
julia = "1.9"
FileWatching = "1.9"
JSON = "0.21"
Logging = "1.9"
Sockets = "1.9"
UUIDs = "1.9"
WebSockets = "1"
julia = "1.9"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
6 changes: 3 additions & 3 deletions src/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import DataFrames
import JSON
import UUIDs
import Sockets
import HTTP

include("utils/événements.jl")

Expand All @@ -17,7 +18,7 @@ end
function avecClient(f::Function, port::Int, codeSecret::String)
client = Client(;port=port, codeSecret=codeSecret, émetteur=Émetteur())

WebSockets.open(string("ws://localhost:", port, "?code=", codeSecret)) do ws_client
WebSockets.open(string("ws://localhost:", port, "?code=", HTTP.escapeuri(codeSecret))) do ws_client
client.ws = ws_client
@async begin
while true
Expand Down Expand Up @@ -203,14 +204,13 @@ function donnéesÀTableau(données):: DataFrames.DataFrame
DataFrames.DataFrame(données)
end

function obtDonnéesTableau(client::Client, idTableau::AbstractString, langues::Vector{String} = String[])
function obtDonnéesTableau(client::Client, idTableau::AbstractString, langues::Union{Vector{String}, Nothing} = nothing)
donnéesTableau = suivreUneFois(
client,
"tableaux.suivreDonnéesExportation",
Dict([("idTableau", idTableau), ("langues", langues)]),
attendreStable(1)
)

donnéesÀTableau(donnéesTableau["données"])
end

Expand Down

0 comments on commit dd92ccf

Please sign in to comment.