Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this func supposed to do anything? #33

Open
Bear-Coding opened this issue Aug 1, 2019 · 3 comments
Open

this func supposed to do anything? #33

Bear-Coding opened this issue Aug 1, 2019 · 3 comments

Comments

@Bear-Coding
Copy link

const transcribe = (filename) => {
fetch(`${window.location.href}api/transcribe?file=${filename}`)
.then(data => data.json()).then(({ files }) => {
});
};

@samjam48
Copy link
Collaborator

samjam48 commented Aug 1, 2019

yes it gets the transcript files ready for them to be shown to the user...

@samjam48 samjam48 closed this as completed Aug 1, 2019
@Bear-Coding Bear-Coding reopened this Aug 1, 2019
@Bear-Coding
Copy link
Author

Why are you using 'window.location.href'? you could just use '/'
Why do you have .then if you are not doing anything?

@samjam48
Copy link
Collaborator

samjam48 commented Aug 1, 2019

ahh. being silly on the window.location.href... cheers!

The function is the complete requirements to load the transcript into the front end. the .then waits for the transcript. All that is required is for ameer to take the transcript file and add it to the dom. Without the .then there would be no transcript file.

(this has now been implemented so the file is now shown In the dom)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants