Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated APIs #573

Merged
merged 2 commits into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package app.ehrenamtskarte.backend.regions.webservice.schema

import app.ehrenamtskarte.backend.common.webservice.DEFAULT_PROJECT
import app.ehrenamtskarte.backend.regions.database.repos.RegionsRepository
import app.ehrenamtskarte.backend.regions.webservice.schema.types.Region
import com.expediagroup.graphql.annotations.GraphQLDescription
Expand All @@ -23,12 +22,4 @@ class RegionsQueryService {
else Region(it.id.value, it.prefix, it.name, it.regionIdentifier)
}
}

@Deprecated("Deprecated in favor of project specific query", ReplaceWith("regionsInProject"))
@GraphQLDescription("Return list of all regions in the eak bayern project.")
fun regions(): List<Region> = regionsInProject(DEFAULT_PROJECT)

@Deprecated("Deprecated in favor of project specific query", ReplaceWith("regionsByIdInProject"))
@GraphQLDescription("Returns regions queried by ids in the eak bayern project.")
fun regionsById(ids: List<Int>) = regionsByIdInProject(DEFAULT_PROJECT, ids)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package app.ehrenamtskarte.backend.stores.webservice.schema

import app.ehrenamtskarte.backend.common.webservice.DEFAULT_PROJECT
import app.ehrenamtskarte.backend.stores.database.repos.AcceptingStoresRepository
import app.ehrenamtskarte.backend.stores.database.repos.PhysicalStoresRepository
import app.ehrenamtskarte.backend.stores.webservice.schema.types.AcceptingStore
Expand Down Expand Up @@ -50,18 +49,6 @@ class AcceptingStoreQueryService {
AcceptingStore(it.id.value, it.name, it.description, it.contactId.value, it.categoryId.value)
}
}

@Deprecated("Deprecated in favor of project specific query", ReplaceWith("physicalStoresInProject"))
@GraphQLDescription("Return list of all accepting stores in the eak bayern project.")
fun physicalStores(): List<PhysicalStore> = physicalStoresInProject(DEFAULT_PROJECT)

@Deprecated("Deprecated in favor of project specific query", ReplaceWith("physicalStoresByIdInProject"))
@GraphQLDescription("Returns list of all accepting stores queried by ids in the eak bayern project.")
fun physicalStoresById(ids: List<Int>) = physicalStoresByIdInProject(DEFAULT_PROJECT, ids)

@Deprecated("Deprecated in favor of project specific query", ReplaceWith("searchAcceptingStoresInProject"))
@GraphQLDescription("Search for accepting stores using searchText and categoryIds in the eak bayern project.")
fun searchAcceptingStores(params: SearchParams): List<AcceptingStore> = searchAcceptingStoresInProject(DEFAULT_PROJECT, params)
}

data class SearchParams(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package app.ehrenamtskarte.backend.verification.webservice.schema

import app.ehrenamtskarte.backend.common.webservice.DEFAULT_PROJECT
import app.ehrenamtskarte.backend.verification.service.CardVerifier
import app.ehrenamtskarte.backend.verification.webservice.schema.types.CardVerificationModel
import com.expediagroup.graphql.annotations.GraphQLDescription
Expand All @@ -12,8 +11,4 @@ class CardQueryService {
fun verifyCardInProject(project: String, card: CardVerificationModel): Boolean {
return CardVerifier.verifyCardHash(project, Base64.decode(card.cardDetailsHashBase64), card.totp)
}

@Deprecated("Deprecated in favor of project specific query", ReplaceWith("verifyCardInProject"))
@GraphQLDescription("Returns whether there is a card with that hash registered for that this TOTP is currently valid")
fun verifyCard(card: CardVerificationModel): Boolean = verifyCardInProject(DEFAULT_PROJECT, card)
}
12 changes: 0 additions & 12 deletions specs/backend-api.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -102,28 +102,16 @@ type Query {
categories: [Category!]!
"Queries all applications for a specific region"
getApplications(regionId: Int!): [ApplicationView!]!
"Return list of all accepting stores in the eak bayern project."
physicalStores: [PhysicalStore!]! @deprecated(reason : "Deprecated in favor of project specific query, replace with physicalStoresInProject")
"Returns list of all accepting stores queried by ids in the eak bayern project."
physicalStoresById(ids: [Int!]!): [PhysicalStore]! @deprecated(reason : "Deprecated in favor of project specific query, replace with physicalStoresByIdInProject")
"Returns list of all accepting stores in the given project queried by ids."
physicalStoresByIdInProject(ids: [Int!]!, project: String!): [PhysicalStore]!
"Returns list of all accepting stores in the given project."
physicalStoresInProject(project: String!): [PhysicalStore!]!
"Return list of all regions in the eak bayern project."
regions: [Region!]! @deprecated(reason : "Deprecated in favor of project specific query, replace with regionsInProject")
"Returns regions queried by ids in the eak bayern project."
regionsById(ids: [Int!]!): [Region]! @deprecated(reason : "Deprecated in favor of project specific query, replace with regionsByIdInProject")
"Returns regions queried by ids in the given project."
regionsByIdInProject(ids: [Int!]!, project: String!): [Region]!
"Return list of all regions in the given project."
regionsInProject(project: String!): [Region!]!
"Search for accepting stores using searchText and categoryIds in the eak bayern project."
searchAcceptingStores(params: SearchParamsInput!): [AcceptingStore!]! @deprecated(reason : "Deprecated in favor of project specific query, replace with searchAcceptingStoresInProject")
"Search for accepting stores in the given project using searchText and categoryIds."
searchAcceptingStoresInProject(params: SearchParamsInput!, project: String!): [AcceptingStore!]!
"Returns whether there is a card with that hash registered for that this TOTP is currently valid"
verifyCard(card: CardVerificationModelInput!): Boolean! @deprecated(reason : "Deprecated in favor of project specific query, replace with verifyCardInProject")
"Returns whether there is a card in the given project with that hash registered for that this TOTP is currently valid"
verifyCardInProject(card: CardVerificationModelInput!, project: String!): Boolean!
}
Expand Down