Commit 9d6114dc authored by nanahira's avatar nanahira

bump aragami

parent 1e590dde
Pipeline #39935 passed with stages
in 6 minutes and 19 seconds
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"@nestjs/platform-express": "^11.0.1", "@nestjs/platform-express": "^11.0.1",
"@nestjs/swagger": "^11.1.5", "@nestjs/swagger": "^11.1.5",
"@nestjs/typeorm": "^11.0.0", "@nestjs/typeorm": "^11.0.0",
"aragami": "^1.2.5", "aragami": "^1.2.6",
"class-transformer": "^0.5.1", "class-transformer": "^0.5.1",
"class-validator": "^0.14.1", "class-validator": "^0.14.1",
"crypto-random-string": "3.3.1", "crypto-random-string": "3.3.1",
...@@ -4723,9 +4723,9 @@ ...@@ -4723,9 +4723,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/aragami": { "node_modules/aragami": {
"version": "1.2.5", "version": "1.2.6",
"resolved": "https://registry.npmjs.org/aragami/-/aragami-1.2.5.tgz", "resolved": "https://registry.npmjs.org/aragami/-/aragami-1.2.6.tgz",
"integrity": "sha512-w+jSXxXYAk3X/TSMoVfc12lY1c40MYqf6W6R2yGE1q7pY4ZC+xpzGBT+Bqa4hO6hlWsM5sFRnKvAE+72HCkT2w==", "integrity": "sha512-GwUaGZRbvk/+iWCMklFTQ9p4sM4XITNHg2twS+04ZfqgXj82RqJj/+NynDD279sU6tzpmrJ3JLUd6DtLFwiLlw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@sesamecare-oss/redlock": "^1.4.0", "@sesamecare-oss/redlock": "^1.4.0",
...@@ -4734,9 +4734,8 @@ ...@@ -4734,9 +4734,8 @@
"encoded-buffer": "^0.2.6", "encoded-buffer": "^0.2.6",
"generic-pool": "^3.9.0", "generic-pool": "^3.9.0",
"ioredis": "^5.2.3", "ioredis": "^5.2.3",
"lodash": "^4.17.21",
"lru-cache": "^7.13.1", "lru-cache": "^7.13.1",
"typed-reflector": "^1.0.11" "typed-reflector": "^1.0.12"
} }
}, },
"node_modules/aragami/node_modules/lru-cache": { "node_modules/aragami/node_modules/lru-cache": {
...@@ -11971,9 +11970,9 @@ ...@@ -11971,9 +11970,9 @@
} }
}, },
"node_modules/typed-reflector": { "node_modules/typed-reflector": {
"version": "1.0.11", "version": "1.0.12",
"resolved": "https://registry.npmjs.org/typed-reflector/-/typed-reflector-1.0.11.tgz", "resolved": "https://registry.npmjs.org/typed-reflector/-/typed-reflector-1.0.12.tgz",
"integrity": "sha512-OhryVYaR+tBEW9Yt2PsPqAniNfbVk1idKbnLxBCBPUSHVRm+Ajik/QxifoJUuGoaXAZDLW9JlJTO6ctXGZX9gQ==", "integrity": "sha512-GMlwkgutVGKvnWXglo/SuMMJsxnw++ThIzJhFM7O01FD0pBYV+QiFQChlHkh+6vL4AtfDj3GdFaDPqssnn+wCQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"reflect-metadata": "^0.1.13" "reflect-metadata": "^0.1.13"
......
...@@ -29,19 +29,14 @@ import { dragRearrange } from '../utility/drag-rearrange'; ...@@ -29,19 +29,14 @@ import { dragRearrange } from '../utility/drag-rearrange';
import { normalSeq } from '../utility/normal-seq'; import { normalSeq } from '../utility/normal-seq';
import { sortAfterSwiss } from '../utility/soft-after-swiss'; import { sortAfterSwiss } from '../utility/soft-after-swiss';
import { InjectAragami } from 'nestjs-aragami'; import { InjectAragami } from 'nestjs-aragami';
import { Aragami, CacheKey, CacheTTL } from 'aragami'; import { Aragami, CacheKey, CacheTTL, CastType } from 'aragami';
import { Type } from 'class-transformer';
@CacheTTL(7200000) @CacheTTL(7200000)
class TournamentCache { class TournamentCache {
id: number; id: number;
noAnalytics: boolean; noAnalytics: boolean;
@Type(() => Object) @CastType(() => Tournament)
tournament: Tournament; tournament: Tournament;
@Type(() => Object)
participants: Participant[];
@Type(() => Object)
matches: Match[];
@CacheKey() @CacheKey()
cacheKey() { cacheKey() {
...@@ -110,15 +105,9 @@ export class TournamentService extends CrudService(Tournament, { ...@@ -110,15 +105,9 @@ export class TournamentService extends CrudService(Tournament, {
cache.id = id; cache.id = id;
cache.noAnalytics = noAnalytics; cache.noAnalytics = noAnalytics;
cache.tournament = result.data; cache.tournament = result.data;
cache.participants = result.data.participants || [];
cache.matches = result.data.matches || [];
cache.tournament.participants = undefined;
cache.tournament.matches = undefined;
return cache; return cache;
}); });
const tournament = Object.assign(new Tournament(), res.tournament); const tournament = res.tournament;
tournament.participants = res.participants;
tournament.matches = res.matches;
tournament.wipeDeckBuf(user); tournament.wipeDeckBuf(user);
return new GenericReturnMessageDto(200, 'success', tournament); return new GenericReturnMessageDto(200, 'success', tournament);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment