mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
fix typo
This commit is contained in:
parent
5bc38414d1
commit
55d05b013b
4 changed files with 5 additions and 4 deletions
|
@ -914,7 +914,7 @@ ActiveRecord::Schema.define(version: 20171026090804) do
|
|||
CASE
|
||||
WHEN (teams.created_by_id = user_teams.user_id) THEN false
|
||||
ELSE true
|
||||
END AS can_be_leaved,
|
||||
END AS can_be_left,
|
||||
user_teams.id AS user_team_id,
|
||||
user_teams.user_id
|
||||
FROM (teams
|
||||
|
|
|
@ -7,7 +7,7 @@ SELECT
|
|||
FROM user_teams
|
||||
WHERE user_teams.team_id = teams.id
|
||||
) AS members,
|
||||
CASE WHEN teams.created_by_id = user_teams.user_id THEN false ELSE true END AS can_be_leaved,
|
||||
CASE WHEN teams.created_by_id = user_teams.user_id THEN false ELSE true END AS can_be_left,
|
||||
user_teams.id AS user_team_id,
|
||||
user_teams.user_id AS user_id
|
||||
FROM teams INNER JOIN user_teams ON teams.id=user_teams.team_id
|
||||
|
|
|
@ -8,6 +8,7 @@ RSpec.describe Datatables::DatatablesTeam, type: :model do
|
|||
it { should have_db_column :role }
|
||||
it { should have_db_column :user_team_id }
|
||||
it { should have_db_column :user_id }
|
||||
it { should have_db_column :can_be_left }
|
||||
end
|
||||
|
||||
describe 'is readonly' do
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
"teams": {
|
||||
"type": "array",
|
||||
"items":{
|
||||
"required": ["id", "name", "members", "role", "can_be_leaved", "user_team_id"],
|
||||
"required": ["id", "name", "members", "role", "can_be_left", "user_team_id"],
|
||||
"properties": {
|
||||
"id": { "type": "integer" },
|
||||
"name": { "type": "string" },
|
||||
"members": { "type": "integer" },
|
||||
"role": { "type": "integer" },
|
||||
"can_be_leaved": { "type": "boolean" },
|
||||
"can_be_left": { "type": "boolean" },
|
||||
"user_team_id": { "type": "integer" },
|
||||
"user_id": { "type": "integer" }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue