package tryslim3.controller.slim3demo_crud;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

import tryslim3.meta.BlogMeta;
import tryslim3.service.BlogService;

public class DeleteController extends Controller {

    private BlogService service = new BlogService();

    private BlogMeta meta = BlogMeta.get();

    @Override
    public Navigation run() throws Exception {
        service.delete(asKey(meta.key), asLong(meta.version));
        return redirect(basePath);
    }
}