NYC Police vs NYC Mayor

It seems that there has been an issue where Mayor Deblasio offered gifts to prisoners. Everything from baseball tickets, movie passes, and gift card where offered. Now it seems NYPD commissioner James O’Niel has put in his resignation. Could the two be related?