From 83270ab2726c8e6be0a3c9c51a068f049950cf72 Mon Sep 17 00:00:00 2001 From: Jasder <2053003901@@qq.com> Date: Fri, 25 Oct 2019 22:41:10 +0800 Subject: [PATCH] FIX bug --- README.md | 2 +- app/services/homes_service.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index be23c6d57..c2050706d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/app/services/homes_service.rb b/app/services/homes_service.rb index badd75369..d3e3c883a 100644 --- a/app/services/homes_service.rb +++ b/app/services/homes_service.rb @@ -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)