get and post api for pins (bug single-page-api)