The mayor and council of said city shall have the power and authority, at any time in their discretion, to repair or cause to be repaired, in the manner and to the extent necessary, any of the public sidewalks in said city which in their opinion are in need of repair and the city shall bear the cost of such repairs.