Skip to content

Commit 54b4576

Browse files
committed
Fix login response
1 parent 34d898a commit 54b4576

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

codersdk/users.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package codersdk
33
import (
44
"context"
55
"encoding/json"
6-
"fmt"
76
"net/http"
87

98
"github.com/coder/coder/coderd"
@@ -49,13 +48,12 @@ func (c *Client) LoginWithPassword(ctx context.Context, req coderd.LoginWithPass
4948
}
5049
defer res.Body.Close()
5150
if res.StatusCode != http.StatusCreated {
52-
fmt.Printf("Are we reading here?\n")
5351
return coderd.LoginWithPasswordResponse{}, readBodyAsError(res)
5452
}
5553
var resp coderd.LoginWithPasswordResponse
5654
err = json.NewDecoder(res.Body).Decode(&resp)
5755
if err != nil {
5856
return coderd.LoginWithPasswordResponse{}, err
5957
}
60-
return coderd.LoginWithPasswordResponse{}, nil
58+
return resp, nil
6159
}

database/query.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
-- Database queries are generated using sqlc. See:
22
-- https://docs.sqlc.dev/en/latest/tutorials/getting-started-postgresql.html
3-
--
3+
--
44
-- Run "make gen" to generate models and query functions.
5+
;
56

67
-- name: GetAPIKeyByID :one
78
SELECT

0 commit comments

Comments
 (0)