How to assign badges with a button click

Hey thanks for the comment, I’ve already figured out how to do it

FRONTEND :

BACKEND :

cheers