bashtube/webroot/unfav.shs

11 lines
334 B
Bash

#!/bin/bash
if session_verify ${cookies[sh_session]} && [[ ${get_data[v]} != '' ]]; then
name=$(session_get_username ${cookies[sh_session]})
vid=$(echo -n ${get_data[v]} | sed -E 's/\r//g')
sed -i "/^$name:$vid/d" storage/faves
fi
meta[redirect]='fav.shs'
#source templates/head.sh
source "${cfg[namespace]}/templates/header.shs"