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 {
try {
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 })
.orderBy("replay.id", "DESC")
.orderBy("replay.date", "DESC")
.limit(10)
.leftJoinAndSelect("replay.players", "player")
.getMany();
......
......@@ -75,7 +75,7 @@ export class DataManager {
try {
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 })
.orderBy("replay.id", "DESC")
.orderBy("replay.date", "DESC")
.limit(10)
.leftJoinAndSelect("replay.players", "player")
.getMany();
......
......@@ -56,7 +56,7 @@ __decorate([
CloudReplay = __decorate([
typeorm_1.Entity({
orderBy: {
id: "DESC"
date: "DESC"
}
})
], CloudReplay);
......
......@@ -5,7 +5,7 @@ import moment from "moment";
@Entity({
orderBy: {
id: "DESC"
date: "DESC"
}
})
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