Implement OAuth client and token management with settings updates (#464)

This commit is contained in:
samanhappy
2025-12-01 16:02:55 +08:00
committed by GitHub
parent b5dff990e5
commit 764959eaca
34 changed files with 2306 additions and 1051 deletions

View File

@@ -16,7 +16,7 @@ export class ServerRepository {
* Find all servers
*/
async findAll(): Promise<Server[]> {
return await this.repository.find();
return await this.repository.find({ order: { createdAt: 'ASC' } });
}
/**
@@ -73,14 +73,14 @@ export class ServerRepository {
* Find servers by owner
*/
async findByOwner(owner: string): Promise<Server[]> {
return await this.repository.find({ where: { owner } });
return await this.repository.find({ where: { owner }, order: { createdAt: 'ASC' } });
}
/**
* Find enabled servers
*/
async findEnabled(): Promise<Server[]> {
return await this.repository.find({ where: { enabled: true } });
return await this.repository.find({ where: { enabled: true }, order: { createdAt: 'ASC' } });
}
/**