A restriction theorem for the Fourier transform