edit post ui and api