Skip to content

Commit

Permalink
added function to fetch following or preceding signs in requested order
Browse files Browse the repository at this point in the history
  • Loading branch information
Vas9ka committed Apr 22, 2024
1 parent e0ce465 commit 39a3be6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/signs/application/SignService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,11 @@ export default class SignService {
listAllSigns(): Bluebird<string[]> {
return this.signsRepository.listAllSigns()
}
findSignsByOrder(
signName: string,
order: string,
sortEra: string
): Bluebird<string[]> {
return this.signsRepository.findSignsByOrder(signName, order, sortEra)
}
}
9 changes: 9 additions & 0 deletions src/signs/infrastructure/SignRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ class SignRepository {
listAllSigns(): Promise<string[]> {
return this.apiClient.fetchJson(`/signs/all`, false)
}
findSignsByOrder(
signName: string,
order: string,
sortEra: string
): Promise<string[]> {
return this.apiClient.fetchJson(
`/signs/${encodeURIComponent(signName)}/${order}/${sortEra}`
)
}
}

export default SignRepository

0 comments on commit 39a3be6

Please sign in to comment.