summaryrefslogtreecommitdiff
path: root/internal/api/client/admin
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-03-26 16:59:39 +0100
committerLibravatar GitHub <noreply@github.com>2025-03-26 15:59:39 +0000
commitb6e481d63eec15191f2717957682c13ee8a68308 (patch)
tree03cb9fc8bcb5f9eefddee754ad64b9de10c44c39 /internal/api/client/admin
parent[chore] bumps our spf13/viper version (#3943) (diff)
downloadgotosocial-b6e481d63eec15191f2717957682c13ee8a68308.tar.xz
[feature] Allow user to choose "gallery" style layout for web view of profile (#3917)
* [feature] Allow user to choose "gallery" style web layout * find a bug and squish it up and all day long you'll have good luck * just a sec * [performance] reindex public timeline + tinker with query a bit * fiddling * should be good now * last bit of finagling, i'm done now i prommy * panic normally
Diffstat (limited to 'internal/api/client/admin')
-rw-r--r--internal/api/client/admin/accountsgetv2_test.go127
1 files changed, 103 insertions, 24 deletions
diff --git a/internal/api/client/admin/accountsgetv2_test.go b/internal/api/client/admin/accountsgetv2_test.go
index 0e3eb95e1..339c97431 100644
--- a/internal/api/client/admin/accountsgetv2_test.go
+++ b/internal/api/client/admin/accountsgetv2_test.go
@@ -223,6 +223,69 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() {
}
},
{
+ "id": "01JPCMD83Y4WR901094YES3QC5",
+ "username": "media_mogul",
+ "domain": null,
+ "created_at": "2025-03-15T11:08:00.000Z",
+ "email": "media.mogul@example.org",
+ "ip": null,
+ "ips": [],
+ "locale": "en",
+ "invite_request": null,
+ "role": {
+ "id": "user",
+ "name": "user",
+ "color": "",
+ "permissions": "0",
+ "highlighted": false
+ },
+ "confirmed": true,
+ "approved": true,
+ "disabled": false,
+ "silenced": false,
+ "suspended": false,
+ "account": {
+ "id": "01JPCMD83Y4WR901094YES3QC5",
+ "username": "media_mogul",
+ "acct": "media_mogul",
+ "display_name": "",
+ "locked": false,
+ "discoverable": false,
+ "bot": false,
+ "created_at": "2025-03-15T11:08:00.000Z",
+ "note": "<p>I'm a test account that posts a shitload of media and I have my account rendered in \"gallery\" mode</p>",
+ "url": "http://localhost:8080/@media_mogul",
+ "avatar": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/avatar/original/01JPHQZ0ZHC2AXJK1JQNXRXQZN.jpeg",
+ "avatar_static": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/avatar/small/01JPHQZ0ZHC2AXJK1JQNXRXQZN.jpeg",
+ "avatar_description": "DESCRIPTION_GOES_HERE",
+ "avatar_media_id": "01JPHQZ0ZHC2AXJK1JQNXRXQZN",
+ "header": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/header/original/01JPHRB7F2RXPTEQFRYC85EPD9.png",
+ "header_static": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/header/small/01JPHRB7F2RXPTEQFRYC85EPD9.webp",
+ "header_description": "DESCRIPTION_GOES_HERE",
+ "header_media_id": "01JPHRB7F2RXPTEQFRYC85EPD9",
+ "followers_count": 0,
+ "following_count": 0,
+ "statuses_count": 2,
+ "last_status_at": "2025-03-15",
+ "emojis": [],
+ "fields": [
+ {
+ "name": "I'm going to post a lot of",
+ "value": "media!",
+ "verified_at": null
+ },
+ {
+ "name": "and there's nothing",
+ "value": "you can do about it",
+ "verified_at": null
+ }
+ ],
+ "enable_rss": true,
+ "group": false
+ },
+ "created_by_application_id": "01HT5P2YHDMPAAD500NDAY8JW1"
+ },
+ {
"id": "01F8MH1H7YV1Z7D2C8K2730QBF",
"username": "the_mighty_zork",
"domain": null,
@@ -547,18 +610,18 @@ func (suite *AccountsGetTestSuite) TestAccountsMinID() {
}
link := recorder.Header().Get("Link")
- suite.Equal(`<http://localhost:8080/api/v2/admin/accounts?limit=1&max_id=%2F%40localhost%3A8080>; rel="next", <http://localhost:8080/api/v2/admin/accounts?limit=1&min_id=%2F%40localhost%3A8080>; rel="prev"`, link)
+ suite.Equal(`<http://localhost:8080/api/v2/admin/accounts?limit=1&max_id=%2F%40media_mogul>; rel="next", <http://localhost:8080/api/v2/admin/accounts?limit=1&min_id=%2F%40media_mogul>; rel="prev"`, link)
suite.Equal(`[
{
- "id": "01AY6P665V14JJR0AFVRT7311Y",
- "username": "localhost:8080",
+ "id": "01JPCMD83Y4WR901094YES3QC5",
+ "username": "media_mogul",
"domain": null,
- "created_at": "2020-05-17T13:10:59.000Z",
- "email": "",
+ "created_at": "2025-03-15T11:08:00.000Z",
+ "email": "media.mogul@example.org",
"ip": null,
"ips": [],
- "locale": "",
+ "locale": "en",
"invite_request": null,
"role": {
"id": "user",
@@ -567,35 +630,51 @@ func (suite *AccountsGetTestSuite) TestAccountsMinID() {
"permissions": "0",
"highlighted": false
},
- "confirmed": false,
- "approved": false,
+ "confirmed": true,
+ "approved": true,
"disabled": false,
"silenced": false,
"suspended": false,
"account": {
- "id": "01AY6P665V14JJR0AFVRT7311Y",
- "username": "localhost:8080",
- "acct": "localhost:8080",
+ "id": "01JPCMD83Y4WR901094YES3QC5",
+ "username": "media_mogul",
+ "acct": "media_mogul",
"display_name": "",
"locked": false,
- "discoverable": true,
+ "discoverable": false,
"bot": false,
- "created_at": "2020-05-17T13:10:59.000Z",
- "note": "",
- "url": "http://localhost:8080/@localhost:8080",
- "avatar": "",
- "avatar_static": "",
- "header": "http://localhost:8080/assets/default_header.webp",
- "header_static": "http://localhost:8080/assets/default_header.webp",
- "header_description": "Flat gray background (default header).",
+ "created_at": "2025-03-15T11:08:00.000Z",
+ "note": "<p>I'm a test account that posts a shitload of media and I have my account rendered in \"gallery\" mode</p>",
+ "url": "http://localhost:8080/@media_mogul",
+ "avatar": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/avatar/original/01JPHQZ0ZHC2AXJK1JQNXRXQZN.jpeg",
+ "avatar_static": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/avatar/small/01JPHQZ0ZHC2AXJK1JQNXRXQZN.jpeg",
+ "avatar_description": "DESCRIPTION_GOES_HERE",
+ "avatar_media_id": "01JPHQZ0ZHC2AXJK1JQNXRXQZN",
+ "header": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/header/original/01JPHRB7F2RXPTEQFRYC85EPD9.png",
+ "header_static": "http://localhost:8080/fileserver/01JPCMD83Y4WR901094YES3QC5/header/small/01JPHRB7F2RXPTEQFRYC85EPD9.webp",
+ "header_description": "DESCRIPTION_GOES_HERE",
+ "header_media_id": "01JPHRB7F2RXPTEQFRYC85EPD9",
"followers_count": 0,
"following_count": 0,
- "statuses_count": 0,
- "last_status_at": null,
+ "statuses_count": 2,
+ "last_status_at": "2025-03-15",
"emojis": [],
- "fields": [],
+ "fields": [
+ {
+ "name": "I'm going to post a lot of",
+ "value": "media!",
+ "verified_at": null
+ },
+ {
+ "name": "and there's nothing",
+ "value": "you can do about it",
+ "verified_at": null
+ }
+ ],
+ "enable_rss": true,
"group": false
- }
+ },
+ "created_by_application_id": "01HT5P2YHDMPAAD500NDAY8JW1"
}
]`, dst.String())
}