freeCodeCamp / CodeAlly-CodeRoad-freeCodeCamp

10 stars 5 forks source link

Get fCC user info to and from a tutorial (add webhook URL) #18

Closed moT01 closed 3 years ago

moT01 commented 3 years ago

Not sure on this one, but we will want to know if an fCC user has completed a tutorial so we can put it in our DB and know if they did all the projects for a cert, or so we can put a checkmark next to what they've completed, etc...

@raisedadead mentioned that this shouldn't be a problem at point, can you provide any input here?

moT01 commented 3 years ago

On the fCC end, we will need to generate URL's for users. On the CodeRoad end, we need a place to enter that URL to submit steps or entire tutorials/projects

AdamZaczek commented 3 years ago

You can pass any environment variables to the docker container like this

https://codeally.io/embed/?repoUrl=https://github.com/codeallyio/hackathon-starter-codeally&envVariables=ENV_VARIABLE=VALUE,ANOTHER_VARIABLE=ANOTHER_VALUE

Let me know if there are any issues!

moT01 commented 3 years ago

I am having an issue @AdamZaczek - I opened one of my URL's, similar to the example you just gave, to test things - I'm quite sure I didn't include any variables when I opened it - now, every embed link I open takes me to the same container (including the example you gave). I outlined some more details here. I cannot confirm if the envVariables are working since I cannot create a new container. The dashboard you mentioned would be nice, so I (and anyone) could manually delete containers if one becomes problematic or something.

AdamZaczek commented 3 years ago

I see, we're on it!

AdamZaczek commented 3 years ago

@moT01 This should work now. Let me know if you see any issues!

moT01 commented 3 years ago

They don't seem to be working quite right @AdamZaczek

When I use a URL like the one you shared directly in the address bar, they show up when I printenv in the terminal of the container

When I have the URL in an <iframe>, they don't show up. I tested it a number of times. That seems to be the difference.

moT01 commented 3 years ago

This appears to be working now - thanks @AdamZaczek 🎉