Updated author api to use mongoose