From b73f724bb7c9d9e4262fe38114bbd76ba94a0b89 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Tue, 22 Aug 2023 11:45:10 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20fork=E5=90=8E=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E9=A1=B9=E7=9B=AE=E6=A0=87=E8=AF=86=E5=86=8Dforked?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/forks_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/forks_controller.rb b/app/controllers/forks_controller.rb index 44b176f8..141ecf13 100644 --- a/app/controllers/forks_controller.rb +++ b/app/controllers/forks_controller.rb @@ -15,6 +15,7 @@ class ForksController < ApplicationController elsif ForkUser.exists?(fork_project_id: @project.id, user_id: current_user.id) fork = ForkUser.find_by(fork_project_id: @project.id, user_id: current_user.id) render json: { status: -1, identifier: fork.fork_project&.identifier, message: "fork失败,你已拥有了这个项目" } + return elsif Project.exists?(user_id: current_user.id, identifier: @project.identifier) render_result(0, "fork失败,你已拥有了这个项目") end