mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 09:17:30 -05:00
Add support for sending messages
This commit is contained in:
@@ -54,10 +54,19 @@ export const apiSlice = createApi({
|
||||
method: 'POST',
|
||||
body: initialEvent
|
||||
})
|
||||
}),
|
||||
contactSystem: builder.mutation({
|
||||
query: (args) => {
|
||||
const {shortName, body} = args;
|
||||
return {
|
||||
url: `/${shortName}/contact`,
|
||||
method: 'POST',
|
||||
body: body
|
||||
}}
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
// Export the auto-generated hook for the `getPosts` query endpoint
|
||||
export const { useGetGroupsQuery, useGetSystemsQuery, useGetTalkgroupsQuery, useGetStatsQuery, useGetEventsQuery, useGetEventQuery, useAddNewEventMutation } = apiSlice
|
||||
export const { useGetGroupsQuery, useGetSystemsQuery, useGetTalkgroupsQuery, useGetStatsQuery, useGetEventsQuery, useGetEventQuery, useAddNewEventMutation, useContactSystemMutation } = apiSlice
|
||||
|
||||
Reference in New Issue
Block a user