fixed commit日志同时更新项目时间

This commit is contained in:
“xxq250” 2022-08-16 15:33:15 +08:00
parent 81b64c18b6
commit dbdb860bb7
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class CommitLogsController < ApplicationController
owner = User.find_by(login: owner_name)
project = Project.where(identifier: repository_name).where(user_id: owner&.id)&.first
project = Project.where(identifier: repository_name).where(gpid: repository_id)&.first if project.blank?
project.update_column(:updated_on, Time.now) if project.present?
params[:commits].each do |commit|
commit_id = commit[:id]
message = commit[:message]