Fix check to see if link exists in db or not.

This seemed like the most friendly way to do this since my other option is checking all links:id for the string of the url