Browse Source

fix tribe_delete

push-params
Evan Feenstra 4 years ago
parent
commit
7971eade71
  1. 1
      api/controllers/chats.ts
  2. 3
      api/utils/tribes.ts
  3. 1
      dist/api/controllers/chats.js
  4. 2
      dist/api/controllers/chats.js.map
  5. 3
      dist/api/utils/tribes.js
  6. 2
      dist/api/utils/tribes.js.map

1
api/controllers/chats.ts

@ -283,7 +283,6 @@ export const deleteChat = async (req, res) => {
message: {}, message: {},
type: constants.message_types.tribe_delete, type: constants.message_types.tribe_delete,
success: function () { success: function () {
console.log("=> delete tribe", chat.uuid)
tribes.delete_tribe(chat.uuid) tribes.delete_tribe(chat.uuid)
}, },
failure: function(){ failure: function(){

3
api/utils/tribes.ts

@ -131,11 +131,10 @@ export async function edit({ uuid, host, name, description, tags, img, price_per
} }
} }
export async function delete_tribe({ uuid }) { export async function delete_tribe(uuid) {
const host = getHost() const host = getHost()
try { try {
const token = await genSignedTimestamp() const token = await genSignedTimestamp()
console.log('=> delete_tribe', `https://${host}/tribe/${uuid}?token=${token}`)
await fetch(`https://${host}/tribe/${uuid}?token=${token}`, { await fetch(`https://${host}/tribe/${uuid}?token=${token}`, {
method: 'DELETE', method: 'DELETE',
}) })

1
dist/api/controllers/chats.js

@ -277,7 +277,6 @@ exports.deleteChat = (req, res) => __awaiter(void 0, void 0, void 0, function* (
message: {}, message: {},
type: constants.message_types.tribe_delete, type: constants.message_types.tribe_delete,
success: function () { success: function () {
console.log("=> delete tribe", chat.uuid);
tribes.delete_tribe(chat.uuid); tribes.delete_tribe(chat.uuid);
}, },
failure: function () { failure: function () {

2
dist/api/controllers/chats.js.map

File diff suppressed because one or more lines are too long

3
dist/api/utils/tribes.js

@ -155,12 +155,11 @@ function edit({ uuid, host, name, description, tags, img, price_per_message, pri
}); });
} }
exports.edit = edit; exports.edit = edit;
function delete_tribe({ uuid }) { function delete_tribe(uuid) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const host = getHost(); const host = getHost();
try { try {
const token = yield genSignedTimestamp(); const token = yield genSignedTimestamp();
console.log('=> delete_tribe', `https://${host}/tribe/${uuid}?token=${token}`);
yield node_fetch_1.default(`https://${host}/tribe/${uuid}?token=${token}`, { yield node_fetch_1.default(`https://${host}/tribe/${uuid}?token=${token}`, {
method: 'DELETE', method: 'DELETE',
}); });

2
dist/api/utils/tribes.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save