mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
- Consolidated `TokenStorage` struct into `internal/auth/models.go` for better organization. - Updated `Client` to use `TokenStorage` for managing email and project ID. - Simplified `SetupUser` method to ensure proper token and project assignment. - Refactored API handlers to leverage new `GetEmail` and `GetProjectID` methods in `Client`. - Cleanup: Removed unused structures and redundant code from `client.go` and `auth.go`. - Adjusted CLI flow in `login.go` and `run.go` for streamlined user onboarding.
10 lines
214 B
Go
10 lines
214 B
Go
package auth
|
|
|
|
type TokenStorage struct {
|
|
Token any `json:"token"`
|
|
ProjectID string `json:"project_id"`
|
|
Email string `json:"email"`
|
|
Auto bool `json:"auto"`
|
|
Checked bool `json:"checked"`
|
|
}
|