Domanda di colloquio di ShareChat

How would you implement API logic behind some user action such as Liking a post. How would UI act, how error case is handled.