Skip to content

Commit 0d31e92

Browse files
authored
release: 0.3.5 (#40)
2 parents e601f57 + 4a87d95 commit 0d31e92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+942
-475
lines changed

โ€ŽREADME.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ farm mode๋Š” ๊ฐ–๊ณ ์žˆ๋Š” ๋ชจ๋“  ๋™๋ฌผ๊ณผ ์ถ”๊ฐ€์ ์ธ ์ •๋ณด๋ฅผ ๋ณด์—ฌ์ค˜์š”.
103103
### Total contributions
104104

105105
Total contribtuions ๋Š” ๊นƒํ—ˆ๋ธŒ์— ๊ฐ€์ž… ํ›„ ์ง‘๊ณ„๋œ Contribtuions ์˜ ์ดํ•ฉ ์ด์—์š”.
106-
_์ƒˆ๋กœ์šด contribtuion์€ ๋ฐ˜์˜์€ ์ตœ๋Œ€ 1์‹œ๊ฐ„์ด ์†Œ์š”๋  ์ˆ˜ ์žˆ์–ด์š”._
106+
_์ƒˆ๋กœ์šด contribution์€ ๋ฐ˜์˜์€ ์ตœ๋Œ€ 1์‹œ๊ฐ„์ด ์†Œ์š”๋  ์ˆ˜ ์žˆ์–ด์š”._
107107

108108
### ๋“ฑ์žฅ ๊ฐ€๋Šฅํ•œ ํŽซ๋“ค
109109

@@ -159,7 +159,7 @@ _์ƒˆ๋กœ์šด contribtuion์€ ๋ฐ˜์˜์€ ์ตœ๋Œ€ 1์‹œ๊ฐ„์ด ์†Œ์š”๋  ์ˆ˜ ์žˆ์–ด์š”.
159159
| TEN_MM <br> <img src="docs/tenmm.svg" width="80px" height="90px"/> | 0.00 | Character created by `10MM` donations <br> Only buy in shop <br> <a href="https://github.com/depromeet/10mm-client-web"> 10MM </a> |
160160
| goblin <br> <img src="docs/goblin.svg" width="80px" height="80px"/> | 0.06 | |
161161
| goblin-bag <br> <img src="docs/goblin-bag.svg" width="100px" height="80px"/> | 0.03 | |
162-
| bbibbi <br> <img src="docs/bbibbi.svg" width="80px" height="100px"/> | 0.00 | Character created by `BBIBBI` donations <br> Only buy in shop <br> <a href="https://play.google.com/store/apps/details?id=com.no5ing.bbibbi&hl=es_PY&gl=US&pli=1"> BBIBBI </a> |
162+
| bibbi <br> <img src="docs/bbibbi.svg" width="80px" height="100px"/> | 0.00 | Character created by `BIBBI` donations <br> Only buy in shop <br> <a href="https://play.google.com/store/apps/details?id=com.no5ing.bbibbi&hl=es_PY&gl=US&pli=1"> BIBBI </a> |
163163

164164
##
165165

โ€Ždocs/bbibbi.svg

Lines changed: 0 additions & 22 deletions
Loading

โ€Ždocs/flamingo.svg

Lines changed: 0 additions & 9 deletions
Loading

โ€Ždocs/goblin-bag.svg

Lines changed: 0 additions & 21 deletions
Loading

โ€Ždocs/goblin.svg

Lines changed: 0 additions & 21 deletions
Loading

โ€Ždocs/tenmm.svg

Lines changed: 0 additions & 24 deletions
Loading
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.gitanimals.render.app
2+
3+
fun interface IdentityApi {
4+
5+
fun getUserByToken(token: String): UserResponse
6+
7+
data class UserResponse(
8+
val id: String,
9+
val username: String,
10+
val points: String,
11+
val profileImage: String,
12+
)
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package org.gitanimals.render.app
2+
3+
import org.gitanimals.render.domain.UserService
4+
import org.gitanimals.render.domain.request.PersonaChangeRequest
5+
import org.springframework.stereotype.Service
6+
7+
@Service
8+
class UserFacade(
9+
private val userService: UserService,
10+
private val identityApi: IdentityApi,
11+
) {
12+
13+
fun changePersona(token: String, personChangeRequest: PersonaChangeRequest) {
14+
val user = identityApi.getUserByToken(token)
15+
16+
userService.changePersona(user.id.toLong(), personChangeRequest)
17+
}
18+
}
Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
package org.gitanimals.render.controller
22

3+
import org.gitanimals.render.app.UserFacade
34
import org.gitanimals.render.controller.response.UserResponse
45
import org.gitanimals.render.domain.UserService
5-
import org.springframework.web.bind.annotation.GetMapping
6-
import org.springframework.web.bind.annotation.PathVariable
7-
import org.springframework.web.bind.annotation.RestController
6+
import org.gitanimals.render.domain.request.PersonaChangeRequest
7+
import org.springframework.http.HttpHeaders
8+
import org.springframework.http.HttpStatus
9+
import org.springframework.web.bind.annotation.*
810

911
@RestController
1012
class PersonaController(
11-
private val userService: UserService
13+
private val userService: UserService,
14+
private val userFacade: UserFacade,
1215
) {
1316

1417
@GetMapping("/users/{username}")
1518
fun getUserByName(@PathVariable("username") username: String): UserResponse {
1619
return UserResponse.from(userService.getUserByName(username))
1720
}
21+
22+
@PatchMapping("/personas")
23+
@ResponseStatus(HttpStatus.OK)
24+
fun changePersona(
25+
@RequestHeader(HttpHeaders.AUTHORIZATION) token: String,
26+
@RequestBody personaChangeRequest: PersonaChangeRequest,
27+
) = userFacade.changePersona(token, personaChangeRequest)
1828
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.gitanimals.render.domain
2+
3+
import jakarta.persistence.Column
4+
import jakarta.persistence.Entity
5+
import jakarta.persistence.Id
6+
import jakarta.persistence.Table
7+
8+
@Entity(name="idempotency")
9+
@Table(name="idempotency")
10+
class Idempotency(
11+
@Id
12+
@Column(name="id")
13+
val id: String
14+
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.gitanimals.render.domain
2+
3+
import org.springframework.data.jpa.repository.JpaRepository
4+
5+
interface IdempotencyRepository : JpaRepository<Idempotency, String>

โ€Žsrc/main/kotlin/org/gitanimals/render/domain/Persona.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Persona(
2020
val level: Level,
2121

2222
@Column(name = "visible", nullable = false)
23-
val visible: Boolean,
23+
var visible: Boolean,
2424

2525
@JsonIgnore
2626
@JoinColumn(name = "user_id")

โ€Žsrc/main/kotlin/org/gitanimals/render/domain/PersonaType.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,13 @@ enum class PersonaType(private val weight: Double) {
10371037
"*{contribution}",
10381038
user.contributionCount().toSvg(0.0, 2.0)
10391039
).replace("*{contribution-display}", "default")
1040+
.replace("*{level-tag-display}", "default")
1041+
} else if (mode == Mode.LINE_NO_CONTRIBUTION) {
1042+
this.replace("*{contribution-display}", "none")
1043+
.replace("*{level-tag-display}", "default")
10401044
} else {
10411045
this.replace("*{contribution-display}", "none")
1046+
.replace("*{level-tag-display}", "none")
10421047
}
10431048
}
10441049

0 commit comments

Comments
ย (0)