Created
October 13, 2017 15:00
-
-
Save davelosert/fcb228e6f695a12360d7760aadea22d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {TodoRepository} from '../TodoRepository'; | |
export const createHTTPTodoRepository = (baseURL: string): TodoRepository => { | |
return { | |
loadAllTODOs: () => fetch(`${baseURL}/todos`).then(result => result.json()) | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment