added post api handler
updated post model
added test posts api under tests/backend