add user and pass for world to env variables

This commit is contained in:
lbenedar
2026-04-27 13:14:17 +03:00
parent fd65631be1
commit 4bb4b04004
11 changed files with 161 additions and 36 deletions

View File

@@ -85,7 +85,7 @@ func (tr *FoundryTransport) CheckAuthResponse(body io.Reader, respLength int) er
return nil
}
func (tr *FoundryTransport) LogInToWorld() error {
func (tr *FoundryTransport) LogInToWorld(userId string, userPass string) error {
if tr.Http.SessionID == nil {
err := tr.Http.GetSessionId()
if err != nil {
@@ -93,8 +93,7 @@ func (tr *FoundryTransport) LogInToWorld() error {
}
}
// TODO: make userid and password from tr object
resp, err := tr.Http.PostJoinWorld("YpMHZge0dxBZS5Cm", "")
resp, err := tr.Http.PostJoinWorld(userId, userPass)
if err != nil {
return err
}
@@ -106,8 +105,6 @@ func (tr *FoundryTransport) LogInToWorld() error {
}
return tr.CheckLoginResponse(resp.Body, contentLen)
// {"userid":"YpMHZge0dxBZS5Cm","password":"","action":"join"}
}
func (tr *FoundryTransport) CheckLoginResponse(body io.Reader, respLength int) error {