Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.

Commit

Permalink
Fixed #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Taskeren committed Sep 21, 2022
1 parent 7919dfb commit aa7cb38
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ interface IBlowReadOnly {
val MongoSet.tunerize: SetModel

fun MongoSet.tunerize(owner: MongoUser?): SetModel = tunerize

val MongoSet.displayNoterName: String
get() = this.noterDisplayOverride ?: getUser(this.noterId)?.username ?: serverUser.username
}
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ class MongoProvider(private val config: MongoExplodeConfig, val detonate: Detona
val s = getParentSet()
return DetailedChartModel(
_id = id,
charter = UserWithUserNameModel(s.noterDisplayOverride ?: getUser(s.noterId)?.username ?: "unknown"),
charter = UserWithUserNameModel(s.displayNoterName),
chartName = "${s.musicName}_${difficultyClass}",
gcPrice = 0,
music = MusicModel(s.musicName, MusicianModel(s.composerName)),
Expand All @@ -926,7 +926,7 @@ class MongoProvider(private val config: MongoExplodeConfig, val detonate: Detona
_id = id,
introduction = introduction ?: "",
coinPrice = price,
noter = NoterModel(noterDisplayOverride ?: getUser(noterId)?.username ?: "unknown"),
noter = NoterModel(displayNoterName),
musicTitle = musicName,
composerName = composerName,
playCount = 0,
Expand All @@ -945,7 +945,7 @@ class MongoProvider(private val config: MongoExplodeConfig, val detonate: Detona
_id = id,
introduction = introduction ?: "",
coinPrice = price,
noter = NoterModel(noterDisplayOverride ?: getUser(noterId)?.username ?: "unknown"),
noter = NoterModel(displayNoterName),
musicTitle = musicName,
composerName = composerName,
playCount = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fun MongoSet.bombify() =
put("introduction", introduction)
put("price", price)
put("status", status.name)
put("noter-name", noterDisplayOverride ?: getUser(noterId)?.username ?: "unknown")
put("noter-name", displayNoterName)
putJsonArray("charts") {
charts.forEach {
add(it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class BlowQueryServiceImpl(private val p: IBlowAccessor) : BlowQueryService {
it.id,
it.status.isRanked,
it.introduction ?: "",
getUser(it.noterId)?.username ?: "unknown",
it.displayNoterName,
it.musicName
)
}
Expand Down

0 comments on commit aa7cb38

Please sign in to comment.