19 lines
465 B
Java
19 lines
465 B
Java
package nouritsu;
|
|
|
|
import io.vavr.collection.List;
|
|
import io.vavr.control.Either;
|
|
import nouritsu.types.Message;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Dao {
|
|
public Either<Message, String> clearList(String id) {
|
|
return Either.right("Cleared list of user “%s“".formatted(id));
|
|
}
|
|
|
|
public Either<Message, String> getList(String id) {
|
|
return Either.right(List.of("first", "second", "third")
|
|
.collect(Collectors.joining(",")));
|
|
}
|
|
}
|