Skip to content

Commit 61c6eef

Browse files
author
Bot
committed
Fix ModelUser compilation error
1 parent b848c6e commit 61c6eef

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

  • api/src/commonMain/kotlin/dev/materii/gloom/api/model

api/src/commonMain/kotlin/dev/materii/gloom/api/model/ModelUser.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,14 @@ data class ModelUser(
151151
val orgProfile = upq.repositoryOwner?.orgProfile
152152
if (orgProfile != null) {
153153
return ModelUser(
154-
ModelUser(
155-
username = login,
156-
displayName = name,
157-
bio = bio,
158-
avatar = avatarUrl.toString(),
159-
readme = readme?.contentHTML?.toString(),
154+
username = orgProfile.login,
155+
displayName = orgProfile.name,
156+
bio = orgProfile.bio,
157+
avatar = orgProfile.avatarUrl.toString(),
158+
readme = orgProfile.readme?.contentHTML?.toString(),
160159
type = User.Type.ORG,
161-
website = websiteUrl.toString(),
162-
socials = twitterUsername?.let {
160+
website = orgProfile.websiteUrl.toString(),
161+
socials = orgProfile.twitterUsername?.let {
163162
listOf(
164163
Social(
165164
"@$it",
@@ -168,16 +167,17 @@ data class ModelUser(
168167
)
169168
)
170169
} ?: emptyList(),
171-
email = publicEmail,
172-
location = location,
173-
repos = repositories.totalCount.toLong(),
174-
sponsoring = sponsoring.totalCount.toLong(),
170+
email = orgProfile.publicEmail,
171+
location = orgProfile.location,
172+
repos = orgProfile.repositories.totalCount.toLong(),
173+
sponsoring = orgProfile.sponsoring.totalCount.toLong(),
175174
isMember = viewerIsAMember,
176-
pinnedItems = pinnedItems.nodes?.map { ModelRepo.fromPinnedRepo(it?.pinnedRepo) }
175+
pinnedItems = orgProfile.pinnedItems.nodes?.map { ModelRepo.fromPinnedRepo(it?.pinnedRepo) }
177176
?: emptyList(),
178177
isSupporter = false
179178
)
180179
}
180+
}
181181
} else {
182182
ModelUser(type = User.Type.USER)
183183
}

0 commit comments

Comments
 (0)