Pergunta de entrevista da empresa 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.