Merge pull request #4285 from omnivore-app/fix/web-update-highlights-input

Fix the input values on update highlight to not send extra values
This commit is contained in:
Jackson Harper
2024-08-20 18:07:34 +08:00
committed by GitHub

View File

@ -91,7 +91,12 @@ export const useUpdateHighlight = () => {
input: UpdateHighlightInput
}) => {
const result = (await gqlFetcher(GQL_UPDATE_HIGHLIGHT, {
input: variables.input,
input: {
highlightId: variables.input.highlightId,
annotation: variables.input.annotation,
sharedAt: variables.input.sharedAt,
color: variables.input.color,
},
})) as UpdateHighlightData
if (result.updateHighlight.errorCodes?.length) {
throw new Error(result.updateHighlight.errorCodes[0])