Master Salesforce development through interactive challenges, real-time feedback, and expert guidance.
public with sharing class LightningChallengeController {
@AuraEnabled(cacheable=true)
public static List<Challenge__c> getChallenges() {
return [SELECT Id, Name, Description__c, Difficulty__c,
Points__c, Status__c, Category__c
FROM Challenge__c
ORDER BY CreatedDate DESC];
}
@AuraEnabled
public static ChallengeResult submitChallenge(String challengeId,String code) {
return executeTests(challengeId, code);
}
}