Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…awa-api into develop
  • Loading branch information
meetulr committed Jan 28, 2024
2 parents 0d56d46 + 6eb9bbd commit 256af0e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,18 @@ export const ADMIN_CANNOT_CHANGE_ITS_ROLE = {
PARAM: "admin.changeOwnRole",
};

export const POST_NEEDS_TO_BE_PINNED = {
MESSAGE: "Post needs to be pinned inorder to add a title",
CODE: "post.notAllowedToAddTitle",
PARAM: "post.notAllowedToAddTitle",
};

export const PLEASE_PROVIDE_TITLE = {
MESSAGE: "Please provide a title to pin post",
CODE: "post.provideTitle",
PARAM: "post.provideTitle",
};

export const USER_NOT_AUTHORIZED_TO_PIN = {
MESSAGE:
"The user must be a superadmin or an admin of the organization to pin/unpin posts",
Expand Down
2 changes: 1 addition & 1 deletion src/typeDefs/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export const mutations = gql`
signUp(data: UserInput!, file: String): AuthData!
togglePostPin(id: ID!): Post! @auth
togglePostPin(id: ID!, title: String): Post! @auth
unassignUserTag(input: ToggleUserTagAssignInput!): User @auth
Expand Down
1 change: 1 addition & 0 deletions src/types/generatedGraphQLTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ export type MutationSignUpArgs = {

export type MutationTogglePostPinArgs = {
id: Scalars['ID']['input'];
title?: InputMaybe<Scalars['String']['input']>;
};


Expand Down

0 comments on commit 256af0e

Please sign in to comment.