mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 19:29:11 +00:00
Add tags
This commit is contained in:
parent
4872914d32
commit
257d8e78e5
2 changed files with 21 additions and 11 deletions
|
@ -22,7 +22,8 @@ defmodule Pleroma.Web.MastodonAPI.Admin.AccountView do
|
||||||
"nickname" => user.nickname,
|
"nickname" => user.nickname,
|
||||||
"deactivated" => user.info.deactivated,
|
"deactivated" => user.info.deactivated,
|
||||||
"local" => user.local,
|
"local" => user.local,
|
||||||
"roles" => Info.roles(user.info)
|
"roles" => Info.roles(user.info),
|
||||||
|
"tags" => user.tags
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -334,7 +334,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
describe "GET /api/pleroma/admin/users" do
|
describe "GET /api/pleroma/admin/users" do
|
||||||
test "renders users array for the first page" do
|
test "renders users array for the first page" do
|
||||||
admin = insert(:user, info: %{is_admin: true})
|
admin = insert(:user, info: %{is_admin: true})
|
||||||
user = insert(:user, local: false)
|
user = insert(:user, local: false, tags: ["foo", "bar"])
|
||||||
|
|
||||||
conn =
|
conn =
|
||||||
build_conn()
|
build_conn()
|
||||||
|
@ -350,14 +350,16 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
"id" => admin.id,
|
"id" => admin.id,
|
||||||
"nickname" => admin.nickname,
|
"nickname" => admin.nickname,
|
||||||
"roles" => %{"admin" => true, "moderator" => false},
|
"roles" => %{"admin" => true, "moderator" => false},
|
||||||
"local" => true
|
"local" => true,
|
||||||
|
"tags" => []
|
||||||
},
|
},
|
||||||
%{
|
%{
|
||||||
"deactivated" => user.info.deactivated,
|
"deactivated" => user.info.deactivated,
|
||||||
"id" => user.id,
|
"id" => user.id,
|
||||||
"nickname" => user.nickname,
|
"nickname" => user.nickname,
|
||||||
"roles" => %{"admin" => false, "moderator" => false},
|
"roles" => %{"admin" => false, "moderator" => false},
|
||||||
"local" => false
|
"local" => false,
|
||||||
|
"tags" => ["foo", "bar"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -397,7 +399,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
"id" => user.id,
|
"id" => user.id,
|
||||||
"nickname" => user.nickname,
|
"nickname" => user.nickname,
|
||||||
"roles" => %{"admin" => false, "moderator" => false},
|
"roles" => %{"admin" => false, "moderator" => false},
|
||||||
"local" => true
|
"local" => true,
|
||||||
|
"tags" => []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -422,7 +425,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
"id" => user.id,
|
"id" => user.id,
|
||||||
"nickname" => user.nickname,
|
"nickname" => user.nickname,
|
||||||
"roles" => %{"admin" => false, "moderator" => false},
|
"roles" => %{"admin" => false, "moderator" => false},
|
||||||
"local" => true
|
"local" => true,
|
||||||
|
"tags" => []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -441,7 +445,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
"id" => user2.id,
|
"id" => user2.id,
|
||||||
"nickname" => user2.nickname,
|
"nickname" => user2.nickname,
|
||||||
"roles" => %{"admin" => false, "moderator" => false},
|
"roles" => %{"admin" => false, "moderator" => false},
|
||||||
"local" => true
|
"local" => true,
|
||||||
|
"tags" => []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -467,7 +472,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
"id" => user.id,
|
"id" => user.id,
|
||||||
"nickname" => user.nickname,
|
"nickname" => user.nickname,
|
||||||
"roles" => %{"admin" => false, "moderator" => false},
|
"roles" => %{"admin" => false, "moderator" => false},
|
||||||
"local" => true
|
"local" => true,
|
||||||
|
"tags" => []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -493,14 +499,16 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
"id" => admin.id,
|
"id" => admin.id,
|
||||||
"nickname" => admin.nickname,
|
"nickname" => admin.nickname,
|
||||||
"roles" => %{"admin" => true, "moderator" => false},
|
"roles" => %{"admin" => true, "moderator" => false},
|
||||||
"local" => true
|
"local" => true,
|
||||||
|
"tags" => []
|
||||||
},
|
},
|
||||||
%{
|
%{
|
||||||
"deactivated" => user.info.deactivated,
|
"deactivated" => user.info.deactivated,
|
||||||
"id" => user.id,
|
"id" => user.id,
|
||||||
"nickname" => user.nickname,
|
"nickname" => user.nickname,
|
||||||
"roles" => %{"admin" => false, "moderator" => false},
|
"roles" => %{"admin" => false, "moderator" => false},
|
||||||
"local" => true
|
"local" => true,
|
||||||
|
"tags" => []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -522,7 +530,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
"id" => user.id,
|
"id" => user.id,
|
||||||
"nickname" => user.nickname,
|
"nickname" => user.nickname,
|
||||||
"roles" => %{"admin" => false, "moderator" => false},
|
"roles" => %{"admin" => false, "moderator" => false},
|
||||||
"local" => true
|
"local" => true,
|
||||||
|
"tags" => []
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue