Merged PR 363: QueryBuilderのままにするか、service層でソートするか検討する
## 概要 [Task2465: QueryBuilderのままにするか、service層でソートするか検討する](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2465) [タスク 2404: controller.tsに不要なログが残っている](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/OMDSDictation/_sprints/taskboard/OMDSDictation%20%E3%83%81%E3%83%BC%E3%83%A0/OMDSDictation/%E3%82%B9%E3%83%97%E3%83%AA%E3%83%B3%E3%83%88%2016-1?workitem=2404) - 元PBI or タスクへのリンク(内容・目的などはそちらにあるはず) - 何をどう変更したか、追加したライブラリなど 割り当て可能ライセンス取得APIのQueryBuilder使用部分に対してコメント文を追加した。 ついでに過去MISOチームで実装したcontrollerの処理で残っていた不要なデバッグログを削除した。 - このPull Requestでの対象/対象外 - 影響範囲(他の機能にも影響があるか) なし ## レビューポイント - 特にレビューしてほしい箇所 - 軽微なものや自明なものは記載不要 - 修正範囲が大きい場合などに記載 - 全体的にや仕様を満たしているか等は本当に必要な時のみ記載 ## UIの変更 - Before/Afterのスクショなど - スクショ置き場 ## 動作確認状況 - ローカルで確認、develop環境で確認など ## 補足 - 相談、参考資料などがあれば
This commit is contained in:
parent
d5c756184b
commit
c4848eb007
@ -132,9 +132,6 @@ export class AccountsController {
|
||||
@Req() req: Request,
|
||||
@Body() body: GetLicenseSummaryRequest,
|
||||
): Promise<GetLicenseSummaryResponse> {
|
||||
console.log(req.header('Authorization'));
|
||||
console.log(body);
|
||||
|
||||
const response = await this.accountService.getLicenseSummary(
|
||||
body.accountId,
|
||||
);
|
||||
@ -170,8 +167,6 @@ export class AccountsController {
|
||||
@UseGuards(RoleGuard.requireds({ roles: [ADMIN_ROLES.ADMIN] }))
|
||||
@Get('me')
|
||||
async getMyAccount(@Req() req: Request): Promise<GetMyAccountResponse> {
|
||||
console.log(req.header('Authorization'));
|
||||
|
||||
// アクセストークン取得
|
||||
const accessToken = retrieveAuthorizationToken(req);
|
||||
const payload = jwt.decode(accessToken, { json: true }) as AccessToken;
|
||||
@ -204,8 +199,6 @@ export class AccountsController {
|
||||
@UseGuards(AuthGuard)
|
||||
@Get('typists')
|
||||
async getTypists(@Req() req: Request): Promise<GetTypistsResponse> {
|
||||
console.log(req.header('Authorization'));
|
||||
// アクセストークン取得
|
||||
const accessToken = retrieveAuthorizationToken(req);
|
||||
const payload = jwt.decode(accessToken, { json: true }) as AccessToken;
|
||||
|
||||
@ -238,8 +231,6 @@ export class AccountsController {
|
||||
@UseGuards(AuthGuard)
|
||||
@Get('typist-groups')
|
||||
async getTypistGroups(@Req() req: Request): Promise<GetTypistGroupsResponse> {
|
||||
console.log(req.header('Authorization'));
|
||||
// アクセストークン取得
|
||||
const accessToken = retrieveAuthorizationToken(req);
|
||||
const payload = jwt.decode(accessToken, { json: true }) as AccessToken;
|
||||
|
||||
@ -546,8 +537,6 @@ export class AccountsController {
|
||||
@Req() req: Request,
|
||||
@Body() body: IssueLicenseRequest,
|
||||
): Promise<IssueLicenseResponse> {
|
||||
console.log(req.header('Authorization'));
|
||||
console.log(body);
|
||||
const { orderedAccountId, poNumber } = body;
|
||||
|
||||
const token = retrieveAuthorizationToken(req);
|
||||
|
||||
@ -107,8 +107,8 @@ export class AccountsService {
|
||||
};
|
||||
return licenseSummaryResponse;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
console.log('get licenseSummary failed');
|
||||
this.logger.error(`error=${e}`);
|
||||
this.logger.error('get licenseSummary failed');
|
||||
throw new HttpException(
|
||||
makeErrorResponse('E009999'),
|
||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
|
||||
@ -51,7 +51,6 @@ export class AuthController {
|
||||
operationId: 'token',
|
||||
})
|
||||
async token(@Body() body: TokenRequest): Promise<TokenResponse> {
|
||||
console.log(body);
|
||||
const idToken = await this.authService.getVerifiedIdToken(body.idToken);
|
||||
|
||||
const isVerified = await this.authService.isVerifiedUser(idToken);
|
||||
|
||||
@ -73,10 +73,6 @@ export class LicensesController {
|
||||
@Req() req: Request,
|
||||
@Body() body: CreateOrdersRequest,
|
||||
): Promise<CreateOrdersResponse> {
|
||||
console.log(req.header('Authorization'));
|
||||
console.log(body);
|
||||
|
||||
// AuthGuardでチェック済みなのでここでのアクセストークンチェックはしない
|
||||
const accessToken = retrieveAuthorizationToken(req);
|
||||
const payload = jwt.decode(accessToken, { json: true }) as AccessToken;
|
||||
|
||||
@ -115,9 +111,6 @@ export class LicensesController {
|
||||
@Req() req: Request,
|
||||
@Body() body: IssueCardLicensesRequest,
|
||||
): Promise<IssueCardLicensesResponse> {
|
||||
console.log(req.header('Authorization'));
|
||||
console.log(body);
|
||||
|
||||
const accessToken = retrieveAuthorizationToken(req);
|
||||
const payload = jwt.decode(accessToken, { json: true }) as AccessToken;
|
||||
|
||||
@ -161,9 +154,6 @@ export class LicensesController {
|
||||
@Req() req: Request,
|
||||
@Body() body: ActivateCardLicensesRequest,
|
||||
): Promise<ActivateCardLicensesResponse> {
|
||||
console.log(req.header('Authorization'));
|
||||
console.log(body);
|
||||
|
||||
const accessToken = retrieveAuthorizationToken(req);
|
||||
const payload = jwt.decode(accessToken, { json: true }) as AccessToken;
|
||||
|
||||
|
||||
@ -137,9 +137,6 @@ export class TasksController {
|
||||
@Headers() headers,
|
||||
@Query() body: AudioNextRequest,
|
||||
): Promise<AudioNextResponse> {
|
||||
const { endedFileId } = body;
|
||||
console.log(endedFileId);
|
||||
|
||||
return { nextFileId: 1234 };
|
||||
}
|
||||
|
||||
@ -403,9 +400,6 @@ export class TasksController {
|
||||
@Headers() headers,
|
||||
@Param() params: ChangeStatusRequest,
|
||||
): Promise<ChangeStatusResponse> {
|
||||
const { audioFileId } = params;
|
||||
console.log(audioFileId);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
@ -445,9 +439,6 @@ export class TasksController {
|
||||
@Headers() headers,
|
||||
@Param() params: ChangeStatusRequest,
|
||||
): Promise<ChangeStatusResponse> {
|
||||
const { audioFileId } = params;
|
||||
console.log(audioFileId);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
@ -424,6 +424,7 @@ export class LicensesRepositoryService {
|
||||
): Promise<AllocatableLicenseInfo[]> {
|
||||
const nowDate = new DateWithZeroTime();
|
||||
const licenseRepo = this.dataSource.getRepository(License);
|
||||
// EntityManagerではorderBy句で、expiry_dateに対して複数条件でソートを使用するため出来ない為、createQueryBuilderを使用する。
|
||||
const queryBuilder = licenseRepo
|
||||
.createQueryBuilder('license')
|
||||
.where('license.account_id = :accountId', { accountId: myAccountId })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user