This commit is contained in:
Jasder 2019-10-25 22:41:10 +08:00
parent 62f38402f7
commit 83270ab272
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ curl -X PUT http://localhost:3001/api/v1/homes/sync_count \
token(requires): String权限验证
type(requires): String同步的类型取值范围: {user(用户) | project(开源项目) | practical_training_project(实训项目) | scholl(应用高校)}
type(requires): String同步的类型取值范围: {user(用户) | project(开源项目) | practical_training_project(实训项目) | school(应用高校)}
number(optional): Integer同步数量, 该参数可选不传时后台默认值为1

View File

@ -6,7 +6,7 @@ class HomesService
home.update_attributes!(users_count: home.users_count + sync_count)
when "project"
home.update_attributes!(projects_count: home.projects_count + sync_count)
when 'scholl'
when 'school'
home.update_attributes!(scholls_count: home.scholls_count + sync_count)
when "practical_training_project"
home.update_attributes!(practical_training_projects_count: home.practical_training_projects_count + sync_count)