You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: users_controller.rb
    path of file: ./repos/danbooru/app/controllers/admin
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Admin
  class UsersController < ApplicationController
    def edit
      @user
    
    def update
      @user = authorize User.find(params[:id]), :promote?

      @level = params.dig(:user, :level)

      @user.promote_to!(@level, CurrentUser.user)

      redirect_to edit_admin_user_path(@user), :notice => "User updated"
    end