module Api::ProjectHelper
  extend ActiveSupport::Concern

  def load_project 
    namespace = params[:owner]
    repo = params[:repo]

    @project, @owner = Project.find_with_namespace(namespace, repo)

    if @project
      logger.info "###########：project founded"
			@project
    else
			logger.info "###########：project not found"
      @project = nil
       render_not_found and return
    end
    @project
  end
end