Corrected 2 times post with Blogger provider
This commit is contained in:
parent
2ed97112da
commit
eede86ccc5
@ -7,17 +7,22 @@ define(["jquery", "core", "google-helper"], function($, core, googleHelper) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
bloggerProvider.publish = function(publishAttributes, title, content, callback) {
|
bloggerProvider.publish = function(publishAttributes, title, content, callback) {
|
||||||
googleHelper.uploadBlogger(publishAttributes.blogUrl,
|
googleHelper.uploadBlogger(
|
||||||
publishAttributes.blogId, publishAttributes.postId, title, content,
|
publishAttributes.blogUrl,
|
||||||
|
publishAttributes.blogId,
|
||||||
|
publishAttributes.postId,
|
||||||
|
title,
|
||||||
|
content,
|
||||||
function(error, blogId, postId) {
|
function(error, blogId, postId) {
|
||||||
if(error) {
|
if(error) {
|
||||||
callback(error);
|
callback(error);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
publishAttributes.blogId = blogId;
|
||||||
|
publishAttributes.postId = postId;
|
||||||
|
callback();
|
||||||
}
|
}
|
||||||
publishAttributes.blogId = blogId;
|
);
|
||||||
publishAttributes.postId = postId;
|
|
||||||
callback();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bloggerProvider.newPublishAttributes = function(event) {
|
bloggerProvider.newPublishAttributes = function(event) {
|
||||||
|
@ -464,6 +464,7 @@ define(["jquery", "core", "async-runner"], function($, core, asyncRunner) {
|
|||||||
function getBlogId() {
|
function getBlogId() {
|
||||||
if(blogId !== undefined) {
|
if(blogId !== undefined) {
|
||||||
task.chain(publish);
|
task.chain(publish);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "https://www.googleapis.com/blogger/v3/blogs/byurl",
|
url : "https://www.googleapis.com/blogger/v3/blogs/byurl",
|
||||||
|
Loading…
Reference in New Issue
Block a user