Skip to content

Commit

Permalink
added function to fetch signs in the required order
Browse files Browse the repository at this point in the history
  • Loading branch information
Vas9ka committed Apr 22, 2024
1 parent d32d88d commit cc4b36e
Show file tree
Hide file tree
Showing 2 changed files with 17 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)
}
}
10 changes: 10 additions & 0 deletions src/signs/infrastructure/SignRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ 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 cc4b36e

Please sign in to comment.