Merge pull request #408 from omnivore-app/fix/update-set-labels-input

Rename linkId to pageId in SetLabelsInput
This commit is contained in:
Jackson Harper 2022-04-12 15:26:53 -07:00 committed by GitHub
commit 686b00bc4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -1460,7 +1460,7 @@ export enum SetLabelsErrorCode {
export type SetLabelsInput = {
labelIds: Array<Scalars['ID']>;
linkId: Scalars['ID'];
pageId: Scalars['ID'];
};
export type SetLabelsResult = SetLabelsError | SetLabelsSuccess;

View file

@ -1070,7 +1070,7 @@ enum SetLabelsErrorCode {
input SetLabelsInput {
labelIds: [ID!]!
linkId: ID!
pageId: ID!
}
union SetLabelsResult = SetLabelsError | SetLabelsSuccess

View file

@ -203,7 +203,7 @@ export const setLabelsResolver = authorized<
>(async (_, { input }, { claims: { uid }, log, pubsub }) => {
log.info('setLabelsResolver')
const { linkId: pageId, labelIds } = input
const { pageId, labelIds } = input
try {
const user = await getRepository(User).findOneBy({ id: uid })

View file

@ -1359,7 +1359,7 @@ const schema = gql`
union SignupResult = SignupSuccess | SignupError
input SetLabelsInput {
linkId: ID!
pageId: ID!
labelIds: [ID!]!
}

View file

@ -247,7 +247,7 @@ describe('Labels API', () => {
mutation {
setLabels(
input: {
linkId: "${pageId}",
pageId: "${pageId}",
labelIds: [
"${labelIds[0]}",
"${labelIds[1]}"