Commit d87c1685 authored by nanahira's avatar nanahira

fix cloud replay oeder

parent 7a23de70
Pipeline #1261 passed with stages
in 10 minutes and 16 seconds
...@@ -54,7 +54,7 @@ class DataManager { ...@@ -54,7 +54,7 @@ class DataManager {
try { try {
const replays = await this.db.createQueryBuilder(CloudReplay_1.CloudReplay, "replay") const replays = await this.db.createQueryBuilder(CloudReplay_1.CloudReplay, "replay")
.where("exists (select id from cloud_replay_player where cloud_replay_player.cloudReplayId = replay.id and cloud_replay_player.key = :key)", { key }) .where("exists (select id from cloud_replay_player where cloud_replay_player.cloudReplayId = replay.id and cloud_replay_player.key = :key)", { key })
.orderBy("replay.id", "DESC") .orderBy("replay.date", "DESC")
.limit(10) .limit(10)
.leftJoinAndSelect("replay.players", "player") .leftJoinAndSelect("replay.players", "player")
.getMany(); .getMany();
......
...@@ -75,7 +75,7 @@ export class DataManager { ...@@ -75,7 +75,7 @@ export class DataManager {
try { try {
const replays = await this.db.createQueryBuilder(CloudReplay, "replay") const replays = await this.db.createQueryBuilder(CloudReplay, "replay")
.where("exists (select id from cloud_replay_player where cloud_replay_player.cloudReplayId = replay.id and cloud_replay_player.key = :key)", { key }) .where("exists (select id from cloud_replay_player where cloud_replay_player.cloudReplayId = replay.id and cloud_replay_player.key = :key)", { key })
.orderBy("replay.id", "DESC") .orderBy("replay.date", "DESC")
.limit(10) .limit(10)
.leftJoinAndSelect("replay.players", "player") .leftJoinAndSelect("replay.players", "player")
.getMany(); .getMany();
......
...@@ -56,7 +56,7 @@ __decorate([ ...@@ -56,7 +56,7 @@ __decorate([
CloudReplay = __decorate([ CloudReplay = __decorate([
typeorm_1.Entity({ typeorm_1.Entity({
orderBy: { orderBy: {
id: "DESC" date: "DESC"
} }
}) })
], CloudReplay); ], CloudReplay);
......
...@@ -5,7 +5,7 @@ import moment from "moment"; ...@@ -5,7 +5,7 @@ import moment from "moment";
@Entity({ @Entity({
orderBy: { orderBy: {
id: "DESC" date: "DESC"
} }
}) })
export class CloudReplay { export class CloudReplay {
......
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