Corrected 2 times post with Blogger provider
This commit is contained in:
parent
2ed97112da
commit
eede86ccc5
@ -7,8 +7,12 @@ 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);
|
||||||
@ -17,7 +21,8 @@ define(["jquery", "core", "google-helper"], function($, core, googleHelper) {
|
|||||||
publishAttributes.blogId = blogId;
|
publishAttributes.blogId = blogId;
|
||||||
publishAttributes.postId = postId;
|
publishAttributes.postId = postId;
|
||||||
callback();
|
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