package com.atlassian.bitbucket.internal.webhook.json;

import com.atlassian.bitbucket.event.project.ProjectEvent;
import com.atlassian.bitbucket.rest.project.RestProject;
import com.atlassian.bitbucket.util.DateFormatter;
import com.atlassian.bitbucket.webhook.WebHookEventId;

public abstract class AbstractJsonProjectWebHook extends AbstractJsonWebHook {

    private static final String KEY_PROJECT = "project";

    public AbstractJsonProjectWebHook(ProjectEvent event, WebHookEventId webHookEventId, DateFormatter dateFormatter) {
        super(event, webHookEventId, dateFormatter);

        put(KEY_PROJECT, new RestProject(event.getProject()));
    }
}
