Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
happyhackerbird committed May 6, 2024
1 parent a36e3b1 commit df6161d
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 1,090 deletions.
3 changes: 1 addition & 2 deletions src/civic_canister_backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ fn get_derivation_origin(hostname: &str) -> Result<DerivationOriginData, Derivat
#[update]
#[candid_method]
fn add_credentials(principal: Principal, new_credentials: Vec<StoredCredential>) -> String {
// let authorized_principal = Principal::from_text(AUTHORIZED_PRINCIPAL).unwrap();

// Check if the caller is the authorized principal
if caller().to_text() != AUTHORIZED_PRINCIPAL {
return "Unauthorized: You do not have permission to add credentials.".to_string();
Expand Down Expand Up @@ -472,6 +470,7 @@ fn get_all_credentials(principal: Principal) -> Result<Vec<StoredCredential>, Cr
}
}

// To solve the CORS error during the vc-flow
#[query]
#[candid_method(query)]
pub fn http_request(req: HttpRequest) -> HttpResponse {
Expand Down
2 changes: 1 addition & 1 deletion src/civic_canister_frontend
50 changes: 0 additions & 50 deletions src/declarations/relying_canister_frontend/index.d.ts

This file was deleted.

42 changes: 0 additions & 42 deletions src/declarations/relying_canister_frontend/index.js

This file was deleted.

This file was deleted.

Loading

0 comments on commit df6161d

Please sign in to comment.