Home » Java » amazon dynamodb – i am working on Alexa skill using java and Aws dynamo db. every time i enter data it is sending a user id as primary key can i remove that-Exceptionshub

amazon dynamodb – i am working on Alexa skill using java and Aws dynamo db. every time i enter data it is sending a user id as primary key can i remove that-Exceptionshub

Posted by: admin February 23, 2020 Leave a comment

Questions:

this is the code and i want to remove the user id for in this ques

public Optional<String> getSlot(String key) {
    String value = null;
    Request request = input.getRequestEnvelope().getRequest();
    if (request instanceof IntentRequest) {
        IntentRequest intentRequest = (IntentRequest) request;
        value = intentRequest.getIntent().getSlots().get(key).getValue();
    }return Optional.ofNullable(value);
}

this is the other class to add notes

public void addUserNote(String newNote) {
    Map<String, Object> userData = input.getAttributesManager()
            .getPersistentAttributes();
    userData.put("organiser", newNote);
    userData.put("sort", "vinni");
       persistAttributes();
How to&Answers: