feat(client): ts-migration for Introduction templates (#43752)
* chore: rename the file CertificationCard.js to tsx * refactor: refactor the file CertificationCard to tsx refactor: refactor the file CertificationCard to tsx refactor: refactor the file CertificationCard to tsx * chore: rename the file ClaimCertSteps.js to tsx * refactor: refactor the file ClaimCertSteps to TS * chore: rename the file SuperBlockIntro.js to tsx * refactor: refactor the file SuperBlockIntro to TS * chore: rename the file Block.js to tsx * refactor: refactor the file Block to TS refactor: refactor the file Block to TS refactor: refactor the file Block to TS * chore: rename the file CertChallenge.js to tsx * refactor: refactor the file CertChallenge to TS * fix typing * ignore missing redux store connection Co-authored-by: ismail <i.tlemcani@quinten-maroc.com> Co-authored-by: Ismail Tlemcani <ismail.tlemcani@gmail.com> Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import envData from '../../../config/env.json';
|
||||
|
||||
import type {
|
||||
ChallengeFile,
|
||||
ClaimedCertifications,
|
||||
CompletedChallenge,
|
||||
User
|
||||
} from '../redux/prop-types';
|
||||
@@ -158,11 +159,25 @@ export function getUsernameExists(username: string): Promise<boolean> {
|
||||
return get(`/api/users/exists?username=${username}`);
|
||||
}
|
||||
|
||||
// TODO: Does a GET return a bolean?
|
||||
export interface GetVerifyCanClaimCert {
|
||||
response: {
|
||||
type: string;
|
||||
message: {
|
||||
status: boolean;
|
||||
result: string;
|
||||
};
|
||||
variables: {
|
||||
name: string;
|
||||
};
|
||||
};
|
||||
isCertMap: ClaimedCertifications;
|
||||
completedChallenges: CompletedChallenge[];
|
||||
}
|
||||
|
||||
export function getVerifyCanClaimCert(
|
||||
username: string,
|
||||
superBlock: string
|
||||
): Promise<boolean> {
|
||||
): Promise<GetVerifyCanClaimCert> {
|
||||
return get(
|
||||
`/certificate/verify-can-claim-cert?username=${username}&superBlock=${superBlock}`
|
||||
);
|
||||
|
Reference in New Issue
Block a user