Compare commits

...

2 commits

Author SHA1 Message Date
df043b939e Support GET requests for /pets/load 2026-02-05 17:17:46 -08:00
304a7ac9e1 Add 2min items:auto_model cron job 2026-02-05 17:07:52 -08:00
6 changed files with 12 additions and 17 deletions

View file

@ -34,9 +34,10 @@ class PetsController < ApplicationController
end end
def destination def destination
case (params[:destination] || params[:origin]) if request.get?
when 'wardrobe' then wardrobe_path wardrobe_path
else root_path else
root_path
end end
end end

View file

@ -1,8 +1,4 @@
module OutfitsHelper module OutfitsHelper
def destination_tag(value)
hidden_field_tag 'destination', value, :id => nil
end
def latest_contribution_description(contribution) def latest_contribution_description(contribution)
user = contribution.user user = contribution.user
contributed = contribution.contributed contributed = contribution.contributed

View file

@ -25,8 +25,7 @@
%h1= t 'app_name' %h1= t 'app_name'
%h2= t '.tagline' %h2= t '.tagline'
= form_tag load_pet_path, method: 'POST', class: 'primary load-pet-to-wardrobe' do = form_tag load_pet_path, method: 'GET', class: 'primary load-pet-to-wardrobe' do
= hidden_field_tag 'destination', 'wardrobe'
%fieldset %fieldset
%legend= t '.load_pet' %legend= t '.load_pet'
= pet_name_tag class: 'main-pet-name' = pet_name_tag class: 'main-pet-name'

View file

@ -46,7 +46,7 @@ OpenneoImpressItems::Application.routes.draw do
get '/alt-styles', to: redirect('/rainbow-pool/styles') get '/alt-styles', to: redirect('/rainbow-pool/styles')
# Loading and modeling pets! # Loading and modeling pets!
post '/pets/load' => 'pets#load', :as => :load_pet match '/pets/load' => 'pets#load', :as => :load_pet, via: [:get, :post]
get '/modeling' => 'pets#bulk', :as => :bulk_pets get '/modeling' => 'pets#bulk', :as => :bulk_pets
# Contributions to our modeling database! # Contributions to our modeling database!

View file

@ -442,13 +442,12 @@
mode: "755" mode: "755"
state: directory state: directory
- name: Remove 10min cron job to run `rails nc_mall:sync` - name: Create 2min cron job to run `rails items:auto_model`
become_user: impress become_user: impress
cron: cron:
state: absent name: "Impress: auto-model items"
name: "Impress: sync NC Mall data" minute: "*/2"
minute: "*/10" job: "bash -c 'source /etc/profile && source ~/.bash_profile && cd /srv/impress/current && bin/rails items:auto_model'"
job: "bash -c 'source /etc/profile && source ~/.bash_profile && cd /srv/impress/current && bin/rails nc_mall:sync'"
- name: Create 10min cron job to run `rails neopets:import` - name: Create 10min cron job to run `rails neopets:import`
become_user: impress become_user: impress