mirror of
				https://github.com/owncast/owncast.git
				synced 2025-11-01 02:44:31 +08:00 
			
		
		
		
	User repository (#3795)
* It builds with the new user repository * fix(test): fix broken test * fix(api): fix registration endpoint that was broken after the change * fix(test): update test to reflect new user repository * fix: use interface type instead of concrete type * fix: restore commented out code
This commit is contained in:
		
							
								
								
									
										19
									
								
								models/externalAPIUser.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								models/externalAPIUser.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | ||||
| package models | ||||
|  | ||||
| import ( | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| // ExternalAPIUser represents a single 3rd party integration that uses an access token. | ||||
| // This struct mostly matches the User struct so they can be used interchangeably. | ||||
| type ExternalAPIUser struct { | ||||
| 	CreatedAt    time.Time  `json:"createdAt"` | ||||
| 	LastUsedAt   *time.Time `json:"lastUsedAt,omitempty"` | ||||
| 	ID           string     `json:"id"` | ||||
| 	AccessToken  string     `json:"accessToken"` | ||||
| 	DisplayName  string     `json:"displayName"` | ||||
| 	Type         string     `json:"type,omitempty"` // Should be API | ||||
| 	Scopes       []string   `json:"scopes"` | ||||
| 	DisplayColor int        `json:"displayColor"` | ||||
| 	IsBot        bool       `json:"isBot"` | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Gabe Kangas
					Gabe Kangas