Standardize endpoint name and fix doc. Closes #1966
This commit is contained in:
parent
6ff8c89246
commit
3741196de6
@ -686,7 +686,7 @@ paths:
|
||||
type: string
|
||||
example: https://fediverse.biz/authorize_interaction?uri=https://my.owncast.server/federation/user/streamer
|
||||
|
||||
/api/chat/updatemessagevisibility:
|
||||
/api/chat/messagevisibility:
|
||||
post:
|
||||
summary: Update the visibility of chat messages.
|
||||
description: Pass an array of IDs you want to change the chat visibility of.
|
||||
@ -951,7 +951,7 @@ paths:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
/api/admin/chat/updatemessagevisibility:
|
||||
/api/admin/chat/messagevisibility:
|
||||
post:
|
||||
summary: Update the visibility of chat messages.
|
||||
description: Pass an array of IDs you want to change the chat visibility of.
|
||||
@ -1984,7 +1984,7 @@ paths:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
/api/integrations/chat/updatemessagevisibility:
|
||||
/api/integrations/chat/messagevisibility:
|
||||
post:
|
||||
summary: Update the visibility of chat messages.
|
||||
description: Pass an array of IDs you want to change the chat visibility of.
|
||||
|
@ -126,7 +126,7 @@ func Start() error {
|
||||
http.HandleFunc("/api/admin/chat/messages", middleware.RequireAdminAuth(admin.GetChatMessages))
|
||||
|
||||
// Update chat message visibility
|
||||
http.HandleFunc("/api/admin/chat/updatemessagevisibility", middleware.RequireAdminAuth(admin.UpdateMessageVisibility))
|
||||
http.HandleFunc("/api/admin/chat/messagevisibility", middleware.RequireAdminAuth(admin.UpdateMessageVisibility))
|
||||
|
||||
// Enable/disable a user
|
||||
http.HandleFunc("/api/admin/chat/users/setenabled", middleware.RequireAdminAuth(admin.UpdateUserEnabled))
|
||||
@ -310,7 +310,7 @@ func Start() error {
|
||||
// Inline chat moderation actions
|
||||
|
||||
// Update chat message visibility
|
||||
http.HandleFunc("/api/chat/updatemessagevisibility", middleware.RequireUserModerationScopeAccesstoken(admin.UpdateMessageVisibility))
|
||||
http.HandleFunc("/api/chat/messagevisibility", middleware.RequireUserModerationScopeAccesstoken(admin.UpdateMessageVisibility))
|
||||
|
||||
// Enable/disable a user
|
||||
http.HandleFunc("/api/chat/users/setenabled", middleware.RequireUserModerationScopeAccesstoken(admin.UpdateUserEnabled))
|
||||
|
@ -56,7 +56,7 @@ test('verify we can make API call to mark message as hidden', async (done) => {
|
||||
const message = res.body[0];
|
||||
messageId = message.id;
|
||||
await request
|
||||
.post('/api/admin/chat/updatemessagevisibility')
|
||||
.post('/api/admin/chat/messagevisibility')
|
||||
.auth('admin', 'abc123')
|
||||
.send({ idArray: [messageId], visible: false })
|
||||
.expect(200);
|
||||
|
@ -7,7 +7,7 @@ export const URL_CONFIG = `/api/config`;
|
||||
export const URL_VIEWER_PING = `/api/ping`;
|
||||
|
||||
// inline moderation actions
|
||||
export const URL_HIDE_MESSAGE = `/api/chat/updatemessagevisibility`;
|
||||
export const URL_HIDE_MESSAGE = `/api/chat/messagevisibility`;
|
||||
export const URL_BAN_USER = `/api/chat/users/setenabled`;
|
||||
|
||||
// TODO: This directory is customizable in the config. So we should expose this via the config API.
|
||||
|
Loading…
x
Reference in New Issue
Block a user