Refactor API (#4770)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update description.ts * wip
This commit is contained in:
		@@ -1,8 +1,8 @@
 | 
			
		||||
import { EntityRepository, Repository } from 'typeorm';
 | 
			
		||||
import { Apps } from '..';
 | 
			
		||||
import rap from '@prezzemolo/rap';
 | 
			
		||||
import { AuthSession } from '../entities/auth-session';
 | 
			
		||||
import { ensure } from '../../prelude/ensure';
 | 
			
		||||
import { awaitAll } from '../../prelude/await-all';
 | 
			
		||||
 | 
			
		||||
@EntityRepository(AuthSession)
 | 
			
		||||
export class AuthSessionRepository extends Repository<AuthSession> {
 | 
			
		||||
@@ -12,7 +12,7 @@ export class AuthSessionRepository extends Repository<AuthSession> {
 | 
			
		||||
	) {
 | 
			
		||||
		const session = typeof src === 'object' ? src : await this.findOne(src).then(ensure);
 | 
			
		||||
 | 
			
		||||
		return await rap({
 | 
			
		||||
		return await awaitAll({
 | 
			
		||||
			id: session.id,
 | 
			
		||||
			app: Apps.pack(session.appId, me),
 | 
			
		||||
			token: session.token
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user