forked from SteamWar/SteamWar
Backend Fixes
This commit is contained in:
@@ -45,7 +45,7 @@ data class ResponseSchematicType(val name: String, val db: String)
|
||||
|
||||
@Serializable
|
||||
data class ResponseUser(val name: String, val uuid: String, val prefix: String, val perms: List<String>) {
|
||||
constructor(user: SteamwarUser) : this(user.userName, user.uuid.toString(), user.prefix().chatPrefix, user.perms().map { it.name }) {
|
||||
constructor(user: SteamwarUser) : this(user.userName, user.uuid.toString(), user.prefix().chatPrefix, user.perms().filter { !it.name.startsWith("PREFIX_") }.map { it.name }) {
|
||||
synchronized(cache) {
|
||||
cache[user.id] = this
|
||||
}
|
||||
@@ -149,5 +149,6 @@ fun Route.configureDataRoutes() {
|
||||
inline fun <T> catchException(yield: () -> T): T? = try {
|
||||
yield()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user