history.ts 228 B

1234567891011
  1. export type History = {
  2. id: string
  3. source: string
  4. target: string
  5. }
  6. export type HistoryResponse = {
  7. histories: History[]
  8. }
  9. export const fetchHistories = (url: string) =>
  10. fetch(url).then<HistoryResponse>(r => r.json())