import click


def update(obj, service, token):
    """Update a specific service token in the configuration file."""
    obj.update(service, token)
    obj.save()
    click.echo(f"Updated token for {service}.")
    return 0