Files
Romhack-Plaza---WordPress-P…/ts/submissions/class-set-favorite-server.ts
Benjamin f34019c802 Continue Upload Script.
Pause during rewrite of RHPZ Server code.
2026-01-29 18:49:47 +01:00

34 lines
855 B
TypeScript

import {__, I } from "./globals";
declare const _romhackplaza_script_uploader: any;
declare const romhackplaza_modal_submissions: any;
export class Set_Favorite_Server {
/**
*
* @param callback - MUST BE FROM A Upload child.
*/
constructor( server_id: number ){
this.do_request( server_id );
}
private do_request( server_id : number ){
jQuery.ajax({
type: "POST",
url: _romhackplaza_script_uploader.submit_url,
data: {
action: 'set_favorite_server',
post_id: I.reserved_post_id,
favorite_server: server_id,
_wpnonce: _romhackplaza_script_uploader.set_favorite_nonce
},
success: function(){
console.log( "Favorite server set" );
}
});
}
}