changed api to only ajax routes